Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

5. Identify and describe nine social and cultural identities.

Answered: 1 week ago