Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1. Write a C++ program with function qualityPoints that inputs a student's average and returns 4 if a student's average is 90100,3 if the

image text in transcribed

Exercise 1. Write a C++ program with function qualityPoints that inputs a student's average and returns 4 if a student's average is 90100,3 if the average is 8089,2 if the average is 7079,1 if the average is 60-69, and 0 if the average is lower than 60 . 2. Write a complete C++ program that has three functions named as follows: - int square (int) : calculate an area of square (length*length). - double triangle(double, double) : calculate an area of triangle (0.5 height*base). - double circle (double) : calculate an area of circle (3.14159 (radius * radius)). Your program will continuously run until the user selects ' n '. The following is a sample run: Calculate an area of: 1. Square 2. Triangle 3. Circle Please give your choice [1/2/3]: 2 Enter height and base : 5 10 The area of the triangle is 25.0 Continue [y]: y Calculate an area of: 1. Square 2. Triangle 3. Circle Please give your choice [1/2/3]: 1 Enter side length: 10 The area of the square is 100.0 Continue [y]: n Thank you! Hint: Use do while loop and switch statement

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

Step: 3

blur-text-image

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

Advances In Databases 11th British National Conference On Databases Bncod 11 Keele Uk July 7 9 1993 Proceedings Lncs 696

Authors: Michael F. Worboys ,Anna F. Grundy

1993rd Edition

3540569219, 978-3540569213

More Books

Students also viewed these Databases questions

Question

Describe the new structures for the HRM function. page 676

Answered: 1 week ago