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
Your personality is that of everyone else
lubasha [3.4K]

hmmmmm but is it really

5 0
4 years ago
Read 2 more answers
To prevent class objects from being copied or assigned, you can:
Travka [436]

Answer:

The correct answer to the following question is option 4.

Explanation:

The private class does not mean that the package-private, it means that no other class can see its members.  

It is used in creating the building blocks which is implementing the internal functionality that you don't want to visible to the other projects using the library.

We can use private constructor to ensure that more than one object cannot be created at the time.

6 0
3 years ago
Which of the following statements is true of licensing procedures for IT professionals?
melomori [17]

Answer:

the correct answer is b

Explanation:

4 0
3 years ago
Read 2 more answers
Define a public static method named s2f that takes two String arguments, the name of a file and some text. The method creates th
frez [133]

Answer:

Java solution (because only major programming language that has public static methods)

(import java.io.* before hand)

public static boolean s2f(String fileName, String text){

   try{

       PrintWriter out = new PrintWriter(new File(fileName));

       out.println(text);

       out.close();

       return true;

   }

   catch(Exception e){

       return false;

   }

}

6 0
3 years ago
Bobby is investigating how an authorized database user is gaining access to information outside his normal clearance level. Bobb
Sveta_85 [38]

Answer:

Aggregate Function .

Explanation:

The aggregate function returns the single value of the entire column of the database management system. The Aggregate Function is used in the SELECT statement and the GROUP BY clause.  

The sum(),avg(), etc are some examples of Aggregate Function in the database with the help of aggregate function bobby gains the access to information above the usual clearance point. and summarizes the data.

7 0
3 years ago
Other questions:
  • Which program or security application prevents access between a private and trusted network, and other untrusted networks?
    8·2 answers
  • Demote the "Arrive and leave at the same time each day." List item, and then promote the "Respect" list item.
    6·1 answer
  • Which of the following best explains the concept of a prototype
    10·1 answer
  • From your computer you are able to establish a telnet connection to a remote host but a traceroute to the host IP address result
    6·1 answer
  • Identify the independent and dependent variable in the statement: the number of hours studying for a class and the grade earned.
    12·1 answer
  • State True or False: 1. Application software can run without the presence of system software. 2. . A language processor translat
    14·1 answer
  • What is the first phone ever made?
    6·1 answer
  • Point giveaway and brainliest
    7·2 answers
  • A user generates printouts consisting of several pages of seemingly random characters every time he prints to a network printer.
    5·1 answer
  • In cell b12 create a formula using max f7nction to calculate maximum value in B4:B9
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!