Question: c++ program plz Q1. (2 points] Write a program that asks the user to enter an integer number. The program should calculate the absolute value

 c++ program plz Q1. (2 points] Write a program that asksc++ program plz
the user to enter an integer number. The program should calculate the

Q1. (2 points] Write a program that asks the user to enter an integer number. The program should calculate the absolute value of x using an if statement and prints the result in a message as follows. Hint: The absolute value of x is defined as follows: if x >0; 0, if x = 0; - otherwise. Sample Session: (Values in Red are entered by the user) Enter an integer value for :-15 The absolute value of -15 is 15 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, x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!