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]
2 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]2 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
What stores all software and files on your computer and reads and writes data onto a spinning magnetic or optical disk?
stiv31 [10]

Answer:

Depends. could be an external opticial drive, a scuzi drive, a real to real tape system, or just a simple electromagnetic hard drive with speeds of 1000 rpm or more

8 0
2 years ago
What does &lt;3 mean at the end of a message?
adelina 88 [10]
It is supposed to symbolize a heart, signifying love.
8 0
3 years ago
Create a SELECT statement that returns the count, average, max and min of the invoices submitted by each vendor, who has submitt
sveta [45]

Answer:

SELECT Count(order_invoice) as number_of_invoices, Max(order_invoice) as maximum_invoice, Min(order_invoice) as minimum_invoice, Avg(order_invoice) as average_invoice

FROM vendor JOIN invoice ON invoice.id = vendor.id

WHERE order_invoice > 1

ORDER BY number_of_invoices DESC

Explanation:

The select statement of the SQL or structured query language returns twelve rows of four columns from the inner join of the vendor and invoice table in a database where the order_invoice column in the invoice table is greater than one. The result of the query is ordered by the alias column "number_of_invoices" in descending order.

8 0
2 years ago
Which principle of design does a designer apply when they create rhythmic movement in a garment by using recurring pleats or det
WITCHER [35]

Answer:

Repetition, and regular rhythm

Explanation:

Its certainly repetition method, and repetition method is of three types which are repetition, pattern and rhythm.

Remember repetition can be boring at times as we need to read same thing again and again. However, repetition sometimes can be good like the one we are referring to, and the other one can be like placing the logo or menu at same place in all web page. And its since it creates a habit in us for reading the web pages, And hence we can understand faster, and it looks please to our eyes hence as well.  

4 0
3 years ago
What Windows utility can enable you to shut down an unresponsive application?
boyakko [2]

Answer:

Task manager

Explanation:

Allows you to force quit applications.

4 0
2 years ago
Read 2 more answers
Other questions:
  • Anderson uses his computer and internet link to chart the movement of his favorite 46 stocks. He buys and sells according to the
    15·1 answer
  • Which of the following types of access controls do not describe a lock? (a)- Directive (b)- Physical (c)- Preventative (d)- Dete
    8·1 answer
  • A powerful computer that acts as a hub for other computers is a called a ______.
    6·2 answers
  • Select the correct navigational path to mark all teachers who have achieved “excellent” on their evaluations a red background.
    11·2 answers
  • What is the different between ethical and legal issues?​
    6·1 answer
  • Write the code for invoking a method named sendsignal. there are no arguments for this method . assume that sendsignal is define
    12·1 answer
  • Write a simple hello world program in python 3
    8·2 answers
  • Security Definition updates for windows defender are performed through the ——— function in windows server 2016
    7·2 answers
  • Which one my guys I need help
    7·1 answer
  • HOW TO DISCONNECT A MONITOR FROM A SYSTEM UNIT
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!