C level program 1. Write a program that takes an integer n as input (from Keyboard) and compute and display (a) The sum of digits. (b) The integer with digits reversed, and multiplied by 3. For example, if the input is 4318, then in part (a), you'll display integer 4318, and sum of digits 4 +3+1+8 = 16; and in part (b), you'll compute and display 8134 and also 24402, which is 4318 * 3. (c) Test your program with 3 integers: 4318, 401, and an integer of 5 digits of your choice. Show and explain source code and show output

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 15E: (Program) Write a program to simulate the rolling of two dice. If the total of the two dice is 7 or...
icon
Related questions
Question
C level program
1. Write a program that takes an integer n as input (from Keyboard) and compute and display
(a) The sum of digits.
(b) The integer with digits reversed, and multiplied by 3.
For example, if the input is 4318, then in part (a), you'll display integer 4318, and sum of digits 4 + 3 + 1 + 8 =
16; and in part (b), you'll compute and display 8134 and also 24402, which is 4318 * 3.
(c) Test your program with 3 integers: 4318, 401, and an integer of 5 digits of your choice.
Show and explain source code and show output
Transcribed Image Text:C level program 1. Write a program that takes an integer n as input (from Keyboard) and compute and display (a) The sum of digits. (b) The integer with digits reversed, and multiplied by 3. For example, if the input is 4318, then in part (a), you'll display integer 4318, and sum of digits 4 + 3 + 1 + 8 = 16; and in part (b), you'll compute and display 8134 and also 24402, which is 4318 * 3. (c) Test your program with 3 integers: 4318, 401, and an integer of 5 digits of your choice. Show and explain source code and show output
Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr