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 element of presentation software can you use to add callouts and banners?
Harrizon [31]
<span><span>1.)From the Insert tab, select the Shapes command. A drop-down menu will appear.
</span><span>2.)Select the desired shape
3.)</span></span>Click and drag<span> the slide to create the shape. You may need to move or resize the shape so it points to the desired part of the image.
4.)</span><span>f you want your callout to contain text, start typing while the shape is selected.
5.)</span><span>From the </span>Format<span> tab, you can use the options in the </span>Shape Styles<span> group to customize the appearance of the shape. You can also adjust the font from the Home tab</span>
7 0
3 years ago
Read 2 more answers
Compared to other forms of communication, texting does not offer as many message cues.
solmaris [256]
The correct answer is true.
3 0
3 years ago
Use the STL class vector to write a C function that returns true if there are two elements of the vector for which their product
Tema [17]

Answer:

Code is provided in the attachment form

Explanation:

Vector Multiplication code:

Vector_multiplication.c file contains C code.

See attachment no 1 attached below

Classification of Algorithm: For creating elements in vector c of size n, number of scalar  multiplications is equal to n. The size of original two vectors scales directly with the number of  operations. Hence, it is classified as O(n).

7 0
3 years ago
What would a good digital citizen do in the following situation? Nick sees that his classmate left her email account open on a s
Inessa [10]
1234567898765432123456789876543212345678987654321
3 0
3 years ago
A person who breaks into a computer, network, or online site is called
dybincka [34]

Answer:

B: Hacker

Explanation:

literally anything else aren't even real things besides hacker.

5 0
2 years ago
Read 2 more answers
Other questions:
  • For a color display using 8 bits for each of the primary colors (red, green, blue) per pixel, what should be the minimum size in
    6·1 answer
  • The __________ is a visual or textual storyboard that will assist in determining the type of web pages on your site.
    14·1 answer
  • Given :an int variable k,an int array currentMembers that has been declared and initialized ,an int variable nMembers that conta
    12·1 answer
  • What is the problem with the code snippet below? public class Test { public static void main(String[] args) { System.out.println
    6·1 answer
  • An ____ is a collection of tools, features, and interfaces that enables users to add, update, manage, access, and analyze the co
    10·1 answer
  • Suppose that we want to multiply 500 matrices and we use the optimal parenthesization computed by the MATRIX-CHAIN-ORDER functio
    13·2 answers
  • What is the Microsoft excel window where you work on. And it composed of three worksheet?​
    7·1 answer
  • A person's oral communication skills can give either a positive or negative first impression.
    12·1 answer
  • Which of the following is not a bus type A. Address bus B. Data bus C. Memory bus D. Control bus ​
    7·2 answers
  • Jeroo Bob has just awoken from a long night's sleep and is hungry for some winsum flowers. He walks out of
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!