Question: Programming in C 2. (10 pts) Write a single statement to read the time from the standard input in the form of month/day/year and store
Programming in C
2. (10 pts) Write a single statement to read the time from the standard input in the form of month/day/year and store it in three integer variables named month, day and year 3. (8 pts) Write a single statement to read a two percentage numbers from the standard input. For example, the user enters 33.33% and 66.6% and program stores 33.33 into a float variable named firstPercentage and 66.6 into a float variable named secondPercentage, respectively. The variables firstPercentage and secondPercentage have been declared to be float. 4. (8 pts) Write a single statement that requires a match between "Price=" and the beginning part of the user input and read number following "Price=" from the user into a float variable myPrice. Assume that the variable myPrice has been declared as float. 5. (12 pts) Give the output of the following statements. Explain why. int a = 7, b=2, c=4; printf("Output=%d", a/b+c)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
