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
Spreadsheet feature that can be used to arrange data from highest to lowest based on average<br>​
Juliette [100K]

Answer:

RANK.AVG

Explanation:

Required

Arrange data in descending order based on average

The feature to do this is to use the RANK.AVG() function.

By default, the function will return the ranks of the selected data in descending order (i.e. from highest to lowest); though, the sort order can be changed to ascending order.

The syntax is:

=RANK.AVG (number, ref, [order])

Where

number \to The number to use as rank

ref \to The cell range

order \to 0 represents descending order while 1 represents ascending order

8 0
3 years ago
Quality, personal attention, leadership, and respect are examples of what?
tankabanditka [31]
A good employee, everything u named is a good example of a good employee
8 0
3 years ago
Read 2 more answers
To select more than one sketched entity, you need to press and hold down the ________ key on the keyboard while selecting the en
almond37 [142]

Answer:

The answer to this question is Control(ctrl).

Explanation:

We use control(ctrl) key when we need to select multiple entities.

So when we want to select more than one sketched entity we need to press and hold the control key on the keyboard when we are selecting the items.

Hence we conclude that the answer to this question is Control(ctrl).

6 0
3 years ago
According to policies and procedures, describe the process to report a hazard?
trapecia [35]
When u r in emergency
7 0
3 years ago
Read 2 more answers
You are trying to create a user from the command line on a Linux computer. You get an error that permission is denied. What shou
Alisiya [41]

Answer:

preface the command with sudo

Explanation:

In the scenario being described, the best course of action would be to preface the command with sudo . This is because sudo is a program Linux operating system that allows the individual user to run programs with the security privileges of another user, which usually applies to the superuser. In this scenario, this would allow the user to bypass the error message and gain access to such a task.

5 0
3 years ago
Other questions:
  • 2. Suppose you want to write a method that prints a heading on a new output page, along with a page number that is 1 in the firs
    15·1 answer
  • Write the definition of a function printAttitude , which hasan int parameter and returns nothing. The function prints amessage t
    13·1 answer
  • Which of the following is a command shell with a built-in scripting language?1. The Server Manager’s Roles and Features wizard2.
    11·2 answers
  • 14. Which of the following statements is true? A. The most secure email message authenticity and confidentiality isprovided by s
    11·1 answer
  • HELP ME ASAP
    10·1 answer
  • How does a search engine use algorithms to provide search results?
    15·2 answers
  • The complete process for learning through repetition is to read, write, say, rest and revisit the information. Please select the
    12·2 answers
  • Cómo fue posible que los alemanes exterminando seres humanos​
    11·1 answer
  • A small network that consists of devices connected by Bluetooth, such as a smartphone and a computer, is referred to as a ______
    14·1 answer
  • The impact of the destruction of train station on the budget of the minister of finance
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!