Question: 1. Write a program to compute and display the perimeter (P) and the area (A) of an ellipse. The program will ask the integer values

1. Write a program to compute and display the perimeter (P) and the area (A) of an ellipse. The program will ask the integer values of major axis length (a) and minor axis length (b) as the inputs. Give the answers in 2 decimal numbers. b b a Area A = b Perimeter P = 21 a2 + b2 2 Which; a -> Major axis length, b-> Minor axis length, 1 = 3.14159 2. Write a program that converts minutes to days, hours and minutes. The program output should be as follows: Please enter value in minutes : 8924 8924 minutes is equivalent to; Days : 6 Hours Minutes : 44 3. Steven bought 375 shares of stock at a price of RM35.00 per share. He must pay her stockbroker a 2 percent commission for the transaction. Write a program that calculates and displays the following: a. The amount paid for the stock alone (without the commission) b. The amount of the commission c. The total amount paid for the stock plus the commission) Note : You are required to use constant variable in the program for related variable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
