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
Rounding up and down for 389,422
elena-14-01-66 [18.8K]

Answer:

389420

389430

Explanation:

the up is for 389430

the down is for 389420

4 0
3 years ago
Which tables and fields would you access to determine which book titles have been purchased by a customer and when the order shi
enyata [817]

Answer:

To determine which book titles have been purchased by a customer and when the order shipped the following tables and fields would be used.

Table:      

  • CUSTOMERS

Fields

  • Customerno

Table

  • ORDERS

Fields:

  • Orderno
  • Shipdate
  • Customerno

Table:

  • ORDERITEMS

Fields:

  • Orderno

Table:

  • BOOKS

Fields

  • isbn
  • title

BOOKS table contains field like title of the books, so this will help in finding which book titles have been purchased.

CUSTOMERS table keeps information about customers that purchasing an ordering the books. The customerno uniquely identifies each customer so that the order information can be found using the customerno of a specific customer.

ORDERITEMS keeps information about orders via orderno

ORDERS table will keep track about the shipment of orders. Orderno identifies each order, shipdate will help determine when an order is shipped.

7 0
3 years ago
Organizational structures with one or more layers of authority between top-level management and employees are known as vertical
r-ruslan [8.4K]

The organizational structure described here, which is known as vertical organizational structure, is also commonly identified as tall organizations.

They usually have hierarchical structures, with the CEO being at the very top of the layer. Tall organization have multiple levels, compared to its counterpart, the flat organization or horizontal, which would only have one level.  

8 0
3 years ago
Read 2 more answers
Jenae helps maintain her school web site and needs to create a web site poll for students. Which tool will she use? JavaScript H
irga5000 [103]

Answer:

Text Editor

Explanation:

What the question implies is that, what tool will she need to create the website.

And the answer is a text editor; this is so because the other three options are web development languages used in developing a website but the text editor is where she'll write her line of codes to create the required website poll.

Example of usable text editors are notepad and notepad++ etc.

4 0
3 years ago
Read 2 more answers
What is the lucky 3 digit today
victus00 [196]
That is an interactive question.
4 0
3 years ago
Other questions:
  • An information system is the entire set of __________, people, procedures, and networks that enable the use of information resou
    8·1 answer
  • Can i still download an update for an xbox one game if it's not turned on
    13·1 answer
  • #We've started a recursive function below called #measure_string that should take in one string parameter, #myStr, and returns i
    5·1 answer
  • Which principle of CSR requires that a business state facts fully and accurately?
    8·1 answer
  • To what are multiple servers arranged in racks related
    14·2 answers
  • Write a function called printEvens that prints all the even numbers between 2 and 20, inclusive. It will take no arguments and r
    6·1 answer
  • Many of the first photographers were actullay scientists and inventors
    11·1 answer
  • PLEASE PLEASE PLEASE PLEASE help me Im completly lost will give brainliest and 50 points
    8·2 answers
  • PLS HELP MEE it's due in 2 minutes​
    7·1 answer
  • When viewing an e-book section of an assignment in launchpad, you can return to your main course page at any time by clicking th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!