Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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).
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). 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started