Question: I am using Visual Studio 2022 in C++ Console if that matters. 3. Write a complete C program that can perform the following consecutive tasks:

I am using Visual Studio 2022 in C++ Console if that matters.
3. Write a complete C program that can perform the following consecutive tasks: 1) Read an integer number from the keyboard. 2) Extract the last digit of the number. Note that you may use the modulo % operator to extract the last digit. For example, 19%10=9,63%10=3. 3) If the last digit of the number is less than 7 , you multiply the number by 10 ; otherwise (i.e., the last digit is 7 or greater), you add 10 to the number. 4) Print out the updated integer number. Example Runs to Test your Program: 1) Input 19 from the keyboard, 29 should be displayed on the screen 2) Input 63 from the keyboard, 630 should be displayed on the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
