Question: 14.2 Prog 2 Calculate Area&Circumference java code please (1) Prompt the user to input a character and real number, and output them. (1 pts) Enter

14.2 Prog 2 Calculate Area&Circumference

java code please

(1) Prompt the user to input a character and real number, and output them. (1 pts)

Enter a character: A Enter a number: 5.2 The inputs are A and 5.2 

(2) if the character is 'A' and the number is positive, calculate the area of a circle using the number as the radius, format to 2 decimal places (3 pts)

Area with radius 5.2 is 84.95 

(2) if the character is 'C' and the number is positive, calculate the circumference of a circle using the number as the radius, format to 2 decimal places (3 pts)

Circumference with radius 5.2 is 32.67 

(3) if the character is not 'A' or 'C', or the number is not positive, print error message (3 pts)

Invalid entry

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!