Question: Programing C Task 1: Create a program that asks the user for a decimal number and rounds it down or up, depending its value. If
Programing C
Task 1: Create a program that asks the user for a decimal number and rounds it down or up, depending its value. If the value entered by the user is greater than or equal to .50, round up; if it is lower than .50, round down. The round up process should be implemented with a conditional operator. Use a loop to repeat this process three times. In other words, you will ask the user for a decimal number. Then, you will use a conditional operator to determine the round-up/round-down value. Then, you will print this rounded value and repeat the process two more times. If I were to input 7.5, your program should output 8.0 (don't worry about how many decimals to display). Note: You can find information regarding the conditional operator in the recording of Feb 6ths and in your book at the end of chapter 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
