Question: Purpose: To familiarize yourself with variables and arithmetic . Directions: Convert the following problems below to c++ equivalent code. Each problem should be done within
Purpose: To familiarize yourself with variables and arithmetic.
Directions: Convert the following problems below to c++ equivalent code. Each problem should be done within the same file and all within the same main function. After each step is performed the user should be shown the updated value that was changed. Turn in the finished c++ (.cpp) file for problem 0-6 and the image file for problem 7. Remember to reset or use unique variables for each problem (you cannot declare a variable by the same name twice). In each problem, the user will enter a number(s) on the first step only.
Problem 1-:
Part 1
1: Have the person write down any three digits number with decreasing digits (432 or 875). 2: Reverse the number you wrote in #1. 3: Subtract the number obtained in #2 from the number you wrote in #1 (#1 - #2) 4: Reverse the number obtained in #3 5: Add the numbers found in #3 and #4 What is the answer?
Part 2
For this problem I want you to draw out a flow chart to illustrate the logic. You may use word, DIA, or any other software you choose but be specific on the symbols used to illustrate this problem. If you use hand drawn, make sure the paper is unlined and that your picture of it is clear and legible. Please submit this problem as an image file Take any random 2 digit number Divide the number by 2
Add 17 to the number If the first digit (10s place) of the number is greater than the last than add the first digit to the number, otherwise add the second digit (1s place) If the number is greater than 21 subtract the product of the 2 digits. Repeat this until the number is less than 21 Output the results of the number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
