Create two variables ttlproblems

Assignment Help Basic Computer Science
Reference no: EM132494150

For this project, you will make a program that will test the user's proficiency at solving different types of math problems. The program will be menu driven. The user will select either addition, subtraction, multiplication or division problems. The program will then display a problem, prompt the user for an answer and then check the answer displaying an appropriate message to the user whether their answer was correct or incorrect. The user will be allowed 3 tries at each problem. The program will also keep statistics on how many problems were answered correctly.

At this point you should have a working copy of the program that displays practice programs for addition, subtraction, multiplication and division.

This week you will add functions to allow the user to select problems of varying degrees of difficulty and also keep statistics on number of correct answers vs. total number of problems attempted.

So now let's add the code for the remaining functions:

We'll start by inserting code to ask the user if they want to see problems that are easy, medium or difficult. prompting them to enter 'e' for easy, 'm' for medium or 'd' for difficult and we'll this is right after they have selected the type of problems they want. We will also add a validation loop that will check to see if they entered a correct response (e,m, or d).

Easy - problems using numbers 0 thru 10
Medium - problems 11 thru 100
Difficult - problems 100 - 1000

Here's some code to get you started on the "difficulty level."
if( difficultyLevel == 'E')
{
num1=rand()%10+1;
num2=rand()%10+1;
}
else
if (difficultyLevel == 'M')
{num1=rand()%100+1;
num2=rand()%100+1;
}
else
{ num1=rand()%1000+1;
num2=rand()%1000+1;}

Use an "if" statement to check the difficulty and generate the random numbers.

Statistics:

Create two variables ttlProblems and correctAnswers. Every time the user answers a problem add 1 to ttlProblems and every correct answer add 1 to correctAnswers. We'll display the total number of problems and correct answers as well as the percent correct after the user has selected the exit option on the main menu.

Reference no: EM132494150

Questions Cloud

What is the error in total net income : A company's financial statement, What is the error in total net income for the combined three-year period resulting from the inventory errors?
What is the difference between emulation : 1. What Is The Difference Between Emulation, Native Virtualization, And Para Virtualization?
Take a new record from the user for a new student : Add a new record - take a new record from the user for a new student. Be careful, you may need to allocate more memory using dynamic memory allocation.
Draw the heap that results from inserting : Draw the heap that results from inserting 10, 12, 1, 14, 3, 17, 7, 2, 5, 8, 6 and 70 (in that order) into an initially empty binary max heap.
Create two variables ttlproblems : For this project, you will make a program that will test the user's proficiency at solving different types of math problems. The program will be menu driven.
Can anyone explain me the topic of linked lists : Can anyone explain me the topic of Linked Lists? I am studying data structures using Java and I need help wrapping myself around this concept.
Research on the topic of data analytics and visualization : Project assignment is to have you do more research on the topic of Data Analytics and Visualization. In this project you will need to do some research.
Prepare an answer sheet with the column headings : Agler Company specializes in manufacturing motorcycle helmets. Prepare an answer sheet with the following column headings
Which the land should be recorded in the purchaser books : Recognized by the purchaser as easily being worth $140,000, and is purchased for $137,000, the land should be recorded in the purchaser's books at

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd