Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Two function prototypes is given below: float calculate (float x,float y); void display (float total); Insert marks for 2 quizzes (max 10 marks each): -1

image text in transcribed

Two function prototypes is given below: float calculate (float x,float y); void display (float total); Insert marks for 2 quizzes (max 10 marks each): -1 6.5 Invalid input. Please re-enter Insert marks for 2 quizzes (max 10 marks each): 3.2 21.5 Invalid input. Please re-enter Insert marks for 2 quizzes (max 10 marks each): 6.5 8.3 Your percentage for quiz is 74.00 Average End of Program... Based on the program output shown in Sample 1, you are required to write a program that uses among others the two functions given to you. Details instructions are given below: The program should prompt users for 2 float quizzes inputs. Each input must be more or equals to 0.00, and also at the same time lesser or equals to 10.00. If either one or both inputs do not meet the range, print an "invalid message" and ask users to re-enter the 2 inputs (Use any repetition structure of your choice). Examples of invalid inputs are shown in the first two cycles in Sample 1. The program then call function calculate() to total up both numbers, convert the total to 100.00% value and return the value back to main(). Then, call function display, where first you should display the total quiz % and then a selection of output as follows: Kindly refer to more output shown in Sample 2 and Sample 3. Sample 2 Insert marks for 2 quizzes (max 10 marks each): 8.5 7.9 Your percentage for quiz is 82.00 Good job End of Program... Condition for total quiz % Output Lesser than 40.00 "Work harder" From 40.00 to 79.99 "Average" "Good job From 80.00 to 100.00 Sample 3 Insert marks for 2 quizzes (max 10 marks each): 2.2 1.5 Your percentage for quiz is 18.50 Work harder Chapter 4 barular Ivicrosat Edge End of Program

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

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions

Question

Identify the motives that fuel prejudice.

Answered: 1 week ago

Question

Identify cultural barriers to communication.

Answered: 1 week ago