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]
2 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]2 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
Gabe wants to move text from one document to another document. He should _____.
Lorico [155]
Copy and paste the text
8 0
3 years ago
Read 2 more answers
(9/5)C+32 write QBASIC expessions for this​
grigory [225]

Answer:

REM PROGRAM TO CONVERT TEMPERATURE IN CELCIUS TO FARENHEIT

CLS

INPUT “ENTER TEMPERATURE IN CELCIUS”; C

F = C * (9 / 5) + 32

PRINT “TEMPERATURE IN FARENHEIT=”; F

END

Explanation:

Your formula suggests a celcius to fahrenheit conversion...

8 0
2 years ago
A _______________ is a field that contains data unique to a record.
Andru [333]

A primary key is a field that contains data unique to a record

8 0
3 years ago
A network technician is setting up a wireless access point in the front office of a small company. The technician needs to disab
VladimirAG [237]

Answer:

He should disable UPnP technology to disallow devices to dynamically add themselves to the network without configuration.

Explanation:

  • UPnP stands for Universal Plug n Play.
  • It is an easiest way that allows gadgets to find all other devices connecting to your network.
  • This can also modify router settings to allow devices from outside the network to access the router.
  • External IP address can also be obtained by the gadget and a new port forwarding map can be set
  • So from all perspectives, UPnP is an open invitation for hackers to scan for the ports and hack into the device.
  • UPnP is a vulnerability to the secure system
6 0
3 years ago
Denise is working as a market analyst in a publishing house. What is her career field?
e-lub [12.9K]
Cynthia career field would be a office job such as assisting a CEO or leader of a company.
8 0
3 years ago
Read 2 more answers
Other questions:
  • You're trying to decide which disk technology to use on your new server. the server will be in heavy use around the clock every
    10·1 answer
  • When you respond to an email from your bank that asks you to verify your account information, you may become a victim of a _____
    14·1 answer
  • Given a String variable response that has already been declared, write some code that repeatedly reads a value from standard inp
    10·1 answer
  • The length property of the String object returns
    15·1 answer
  • WRITE A JAVA PROGRAM TO PRINT THE PATTERN<br> 13579<br> 2468<br> 357<br> 46<br> 5
    12·1 answer
  • discuss the benefits of normalization, and do you think we should normalize our designs to higher levels than 3NF? Why or why no
    9·1 answer
  • Which online article citation is correctly formatted according to MLA standards?
    15·2 answers
  • Explain any two features of a computer​
    15·1 answer
  • Which of the following statement is correct ? A . potential difference is measured by ammeter . B . The unit of potential differ
    9·1 answer
  • PLEASE HELP! WILL MARK AS BRAINLIEST!
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!