Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Question 1 Write a program with at least ten (10) functions inclusive of main function. The program is able to generate two random numbers

image text in transcribed

image text in transcribed

c++

Question 1 Write a program with at least ten (10) functions inclusive of main function. The program is able to generate two random numbers by using rand() function. The program is also able to add the two numbers and also compare the result with the input from user. User is given the option to continue or to stop the program. At the end, program is able to display the number and percentage of correct and wrong answer. The program is also able to determine the grade based on the percentage. If 80 100 (EXCELLENT), 60 79.99 (GOOD), 40 - 59.99 (INTERMEDIATE) and () - 39.99 (NEED IMPROVEMENT). You are able to choose between do .. while or while loop. Please fill in your answer for the addition of two numbers below: 1 + 7 = 8 (number (8) is key in by user) 1 + 7 = 8 (correct) Do you want to continue next question (Y/N): Y 4 + 1 = 5 (number 5 is key in by user) 4 + 1 = 5 (correct) Do you want to continue next question (Y/N): Y 9+ 4 = 12 (number 12 is key in by user) 9 +4 = 12 (wrong) Do you want to continue next question (Y/N): Y 8 + 8 = 16 (number 16 is key in by user) 8 + 8 = 16 (correct) Do you want to continue next question (Y/N): N You able to answer 3 correct question and 1 wrong question out of 4 question. Percentage of marks is: 75.00 % - GOOD Do you want to continue next SET OF QUESTION (Y/N): Y Please fill in your answer for the addition of two numbers below: 1 + 7 = 8 (number (8) is key in by user) 1 + 7 = 8 (correct) Do you want to continue next question (Y/N): N You able to answer 1 correct question and O wrong question out of 1 question. Percentage of marks is: 100.00% (EXCELLENT) Do you want to continue next SET OF QUESTION (Y/N): N

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

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

Articulate accuracy advantages of user input on ecommerce websites.

Answered: 1 week ago