Question: C++ Q3. [3 points] Write a program that asks the user to enter an integer number as the week day number (in the range 1-7).


Q3. [3 points] Write a program that asks the user to enter an integer number as the week day number (in the range 1-7). The program should print the name of the day of the week using a switch statement. Assume the first day of the week is Sunday. Sample Session: (Values in Red are entered by the user) Enter week day number (in the range 1-7): 2 Monday Q2. [3 points] Write a program that asks the user to enter a double number. The program should calculate using an if statement the value of f(x) according to the formula below and print the result as follows. (20, *0; 0, if x = 0; - otherwise. Sample Session: (Values in Red are entered by the user) Enter an integer value for x: -15 The absolute value of -15 is 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
