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
asambeis [7]
3 years ago
14

Write a function, reverseDigit, that takes an integer as a parameter and returns the number with its digits reversed. For exampl

e: the value of reverseDigit(12345) is 54321; the value of reverseDigit(5600) is 65; the value of reverseDigit(7008) is 8007; and the value of reverseDigit(–532) is –235
Computers and Technology
1 answer:
Sedbober [7]3 years ago
5 0

Answer:

This program is written in C++. You can implement this program in any language. The code along with comments is given below in explanation section.

Explanation:

#include <iostream>  

using namespace std;  

int main()  // main function

{  

int number, reverseNumber=0, reminder;  //varible declaration  

cout<<"Enter a number: ";  //prompt user to enter the number  

cin>>number;   //save the entered number into number variable  

 while(number!=0)    //while number does not become zero.... remain in loop

 {    

    reminder=number%10;    // taken reminder of number    

    reverseNumber=reverseNumber*10+reminder;   //store the number digit into reverse order  

    number/=10; //decrease the number or shift the division to next digit    

 }    

cout<<"Reversed Number: "<<reverseNumber<<endl;    //print reversed number.  

return 0;  

}  

You might be interested in
Which of the Arts, A/V Technology, and Communication career cluster pathways are involved with producing a product for an audien
PIT_PIT [208]

I believe the pathways are Audio/Visual Technology and Film, Journalism and Broadcasting and Printing Technology .


5 0
3 years ago
Read 2 more answers
If an Administrator performs a clean install of Windows Server 2012 R2 on a new server, and then moves critical domain services
gayaneshka [121]

Answer:

The correct answer to the following question will be "Server role migration".

Explanation:

  • A process of moving data from one data to the next. Security concerns are the causes behind the system relocation, the hardware is also being changed and several other influences.
  • With this, you are setting up a new server, either virtual or physical, running a new version of Windows (Windows Server) and then moving your positions and facilities to the newly constructed Windows Server Virtual Machine/Physical.

Therefore, it's the right answer.

3 0
3 years ago
Which type of information should never be given out on social media?
zhenek [66]

Answer:

Sites like Face.book are full of valuable data for people who use social engineering to steal your identity on social media. You should therefore avoid sharing information that's used to verify your identity,

Explanation:

7 0
3 years ago
Read 2 more answers
So I was wondering how I should get into Game Development?
Hunter-Best [27]
Tbh i depends on what kind of person you are. If you really like video games then go ahead but i guess what you are asking is how and that really doesnt answr your question but 
1) YOU HAVE TO BE FULLY COMMITTED/ MOTIVATED TO THE GAME
that is the number 1 step.Also try to do a little research on the game and the systems, watch videos on how to take the system apart and back together.
I HAVE FAITH IN YOU!!!  YOU CAN DO IT!!! TAKE CHARGE

8 0
3 years ago
A Python function cannot under normal circumstances reference a module variable for its value.
marishachu [46]
This is false because
6 0
3 years ago
Read 2 more answers
Other questions:
  • Explain how Deep Packet Inspection works (DPI). How is this technology beneficial to Perimeter Security? Lastly, describe a scen
    6·1 answer
  • I just want to ask if some one know an online school program that offer a live session and the cost of it not to expensive. for
    10·1 answer
  • Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty
    6·1 answer
  • A thin red border indicates the active cell. (True or False)
    12·1 answer
  • The monkey-and-bananas problem is faced by a monkey in a laboratory with some bananas hanging out of reach from the ceiling. A b
    8·1 answer
  • Identifies the row and column that forms the cell
    11·1 answer
  • COMPUTER CODING
    5·1 answer
  • What is wrong with this code and correct it.
    12·1 answer
  • Free 35 points!!!
    11·2 answers
  • One can find mountain ranges, elevation levels, and deserts on a physical map.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!