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
docker41 [41]
3 years ago
8

Write an algorithm that receives a number from the user (you can store the number in a variable called N). Then the algorithm sh

ould separate the digits of the number and print each in a line starting from the number at one’s place, then the number at ten’s place, and so on. Example: if user inputs 329, then the algorithm should produce the following three lines.
9

2

3
Computers and Technology
1 answer:
lbvjy [14]3 years ago
7 0

Answer:

Algorithm:

1. Declare an integer variable N.

2. Read the value N from user.

3.While(N):

 3.1 find r=N%10;

 3.2 print r in new line.

 3.3 Update N as N=N/10.

4.end program.

Implementation in C++.

// header

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int N;

cout<<"Enter an Integer:";

   cin>>N;

// find the digits of number

   while(N)

   {

       // last digit

       int r=N%10;

       // print last digit

       cout<<r<<endl;

       // update the number

       N=N/10;

}

return 0;

}

Output:

Enter an Integer:329                                        

9                                                          

2                                                          

3

You might be interested in
One of the most obvious initial changes in windows vista is the ____ interface
lana [24]
Answer choices are not provided, but I would go for "Aero."
8 0
3 years ago
Why now days 3D images are used in cartoons? What are the drawbacks of 2D image?
antoniya [11.8K]

Answer:

There are no drawbacks

Explanation:

People just think 3D is more modern-ish. I liked 2D better, but whatever- things are changing.

5 0
3 years ago
Read 2 more answers
The difference between a want and a need is a want is not necessary for survival. Things necessary for survival are known as ___
Zarrin [17]
A.Needs since they are necessary and needed for survival 
8 0
3 years ago
What information system would be most useful in determining what direction to go in the next two years?
cluponka [151]

Its actually Executive information system

3 0
4 years ago
Read 2 more answers
. Explain the notions of WAN, LAN, MAN and PAN.
qaws [65]

Answer:

Explanation:

  1. WAN (Wide Area Network), is a computer network that joins several local networks, although their members are not all in the same physical location.
  2. LAN (Local Area Network) is a network of computers that cover in a small area for example a house, an apartment or a building. One part of the topological definition is the physical topology, which is the actual arrangement of the cables or media.
  3. MAN (metropolitan area network) is a network of computers that interconnects users with computer resources in a geographic area or region larger than area covered by a large local area network (LAN)
  4. PAN (Personal Area Network.) Is a network used to connect different personal computer devices centered on an individual person workspace.
4 0
3 years ago
Other questions:
  • What symbol following a menu command lets you know that a dialog box will be displayed?
    14·1 answer
  • When a class declares an entire class as its friend, the friendship status is reciprocal. That is, each class's member functions
    14·1 answer
  • Write a program that defines an interface having the following methods: addition, subtraction, multiplication, and division. Cre
    8·1 answer
  • A light or optical microscope most commonly used is called a(n) _____. bright-field microscope dark-field microscope electron mi
    8·2 answers
  • What is the meaning of heart symbol in facebook?
    14·1 answer
  • How would you declare an interface named Sports that has the following (show them in your answer as well): A method called jump
    5·1 answer
  • If String str = "Computer Science";, then what is the value of str.substring(10);? ​
    6·1 answer
  • I NEED THIS DONE NOW ASAP, PLS HELP ME
    13·2 answers
  • Need help completing this coding assignment.
    11·1 answer
  • Make a Flow Chart From this C Programming Language Code
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!