1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DiKsa [7]
3 years ago
6

Using a while loop, create an algorithm extractDigits that prints the

Computers and Technology
1 answer:
Soloha48 [4]3 years ago
4 0

Answer:

Follows are the code to this question:

#include <stdio.h>//defining header file

void extractDigits (int n)//defining a method extractDigits that holds

{

int x;//defining integer variable

   while (n > 0)//defining while loop for check value is greater than 0

   {

       x = n % 10;//holding remainder value

    n = n / 10;// holding quotient value

       printf("%d\n", x);//print remainder value

   }

}

int main ()//defining main method

{

extractDigits (54321);//calling above method by passing integer value

}

Output:

1

2

3

4

5

Explanation:

In the above-given code a method "extractDigits" is defined that accepts an integer parameter, and inside the method an integer variable is declared, that use while loop to check value is greater than 0, and calculate the individual digits, and print its values, and inside the main method we call the above method.    

You might be interested in
Among your selection in different online interfaces, which are your top three favorites?​
topjm [15]
What is this ? History or ?
6 0
3 years ago
Read 2 more answers
An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
maksim [4K]

Answer:

The data is transformed to usually make it smaller. It can always be re-constructed back to the original.

Explanation:

I'm on the same lesson on code.org as you, so just go to the question before and the answer to that question was the answer!  ;)

Let me know if you got it right!

5 0
3 years ago
There is one clear definition of IT. True False
Elenna [48]

Answer:

That is False. it has more definitions not only one.

8 0
3 years ago
Justine was interested in learning how to play the piano. Before she was allowed to even play the piano, she has had to learn
Setler [38]

Answer:

A

Explanation:

The answer is A because, to be novice at something that means one is new to and is inexperienced at said activity.

3 0
3 years ago
Read 2 more answers
How is the phrase "employability skills" defined?
Digiron [165]

Answer:

Problem-solving. Why is problem-solving so valued? Companies face a lot of obstacles. Those better able to cope

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Sarah is working on a project in which she needs to record all the extracurricular activities in her college. Her college teache
    13·2 answers
  • Which sentences in the passage show the preventive measures to avoid data breach?
    9·1 answer
  • Cómo pongo un tomo de llamada SIN PAGAR?
    7·1 answer
  • What type of cable is used to connect a workstation serial port to a cisco router console port?
    15·1 answer
  • Cross-functional systems are being phased out in favor of systems that support business processes within a single functional gro
    14·1 answer
  • Engineers and scientists redesign a prototype if it does not work correctly true or false and why
    10·2 answers
  • The replacer parameter of the stringify method accepts a/an ______________ or an array.
    15·1 answer
  • Write a function findWithinThreshold that identifies the elements of a given array that are inside a threshold value. Takes the
    13·1 answer
  • 5. Compare the telephone network and the internet. What are the similarities? What are the differences?
    12·1 answer
  • What is the most common etical rule that must be applied in all technologies​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!