Question: 1 / 2 - 100% + Project 2 Let consider the intervals I1 = (-2, *), 12 = [5,99), and 13 = 1-50,-41, (1.1 for

 1 / 2 - 100% + Project 2 Let consider the

1 / 2 - 100% + Project 2 Let consider the intervals I1 = (-2, *), 12 = [5,99), and 13 = 1-50,-41, (1.1 for inclusive and 1 for excusive) Write a C script to perform the following: 1) Define PI (*) as a constant and set it value rounded to 4 decimal places. 2) Ask the user to enter a real number 3) Save the user response as a variable a of type float 4) If a belongs to the interval 11 = (-2, f), display on the console "a is between - PI and PI" and "a is not between-Pl and Pl" otherwise 5) If a belongs to the interval 12 - [5.99 display on the console a is between 5 and 99 and "a is not between 5 and 99* otherwise 6) Ask the user to enter a the value of an angle in degrees, you save the entry as angleInDegrees. Compute its value in radians into the variable angleInRadians, print out: The angle you enter in degree is equivalent to angleInRadians radians. 7) Ask the user to enter the coordinates of two points A-(x1, yl) and B - (x2, y2) 8) Save the variables xl. yl 2 and y2 as type float 9) Display on the console the coordinates of the mid-point M(x1 + x29/2. (y + y2y2) between A and B 10) Display on the console the distance between A and Busing the relation distance -sqrt(x2-x1y+ (y2-yl) DO

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!