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
e-lub [12.9K]
3 years ago
10

Write a function that takes an integer and reverses the digits. The function returns the reversed number to main. Here is the pr

ototype for this function. Write main() to test this function. Use only int data type and arithmetic to solve this problem.
Computers and Technology
1 answer:
laila [671]3 years ago
5 0

Answer:

The prototype part missing has been assumed to be:

int reverseNum (int num);

Code:

#include <iostream>

using namespace std;

int reverseNum(int num);

int main()

{

int num=0,result=0;

cout<<"Enter the number:";

cin>>num;

result=reverseNum(num);

cout<<"The reversed number :"<<result<<endl;

return 0;

}

int reverseNum(int num)

{

int temp=0,digit=0;

for(num;num>0;num=num/10)

{

digit=num%10;

temp=temp*10+digit;

}

return temp;

}

Explanation:

You might be interested in
Please answer my question i dont know what suitable techinal term is​
kompoz [17]

Answer:

e-mail is the ans email is the ans

8 0
3 years ago
StreamPal is an audio-streaming application for mobile devices that allows users to listen to streaming music and connect with o
valentina_108 [34]

Answer:

Users of the application may have the ability to determine information about the locations of users that are not on their contact list.

6 0
3 years ago
Boolean logic deals with statements having one of _____ values.
Alexxandr [17]

Answer:

2 values

Explanation:

boolean statements can only be True or False

6 0
3 years ago
Assuming each reference costs 1 byte, and each piece of data/info costs 1 byte as well. When will a doubly linked list be more a
NeX [460]

Answer:

The circular individually linked list is more efficient for time sharing process ,when multiple application are running on pc it is responsibility of an output system to put all process on a list and execute them all by giving them piece of time and make them wait when cpu is selected to other process.

It will be more suitable for output system to use circular list as when it reaches to last of list it will be manually reaches to starting node or process.

Singly circular linked list is used when we are concerned with the memory as only one process will be allocated memory at once and there are no chances of process to go never-ending waiting.

Explanation:

8 0
4 years ago
Replace the underlines with the words in parentheses that follow: the ____ solves the ____ of a ____ by expressing an ____ in a
adell [148]

The programmer solves the problems of a user by expressing an algorithm in a programming language to make a program that can run on a computer.

5 0
4 years ago
Other questions:
  • ____ was the first-generation cellular telephone system.​ a. ​Advanced Mobile Phone Service (AMPS) b. ​Global System for Mobile
    12·2 answers
  • A student is searching through a large box of unused cables and connectors in the classroom. The student finds a ribbon with con
    14·1 answer
  • If a movie starts at 305 and the movie is 2 hrs and 44 mins when does the movie end?
    14·1 answer
  • Regularly Tuning up a computer can assist keeping it running at Peak speed. True or False?
    12·1 answer
  • Write a single statement that will print the message "first is " followed by the value of first, and then a space, followed by "
    9·1 answer
  • Send answer below, Thank you
    8·1 answer
  • An interrupt priority scheme can be used to ____. allow the most urgent work to be finished first make it possible for high-prio
    14·1 answer
  • What is fair use?
    15·2 answers
  • When you open your word-processing program, it opens in a<br> field<br> menu
    9·2 answers
  • _____ is the practice of using the internet to provide healthcare without going to a doctor’s office or hospital.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!