1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
satela [25.4K]
4 years ago
12

Write a program that can be used as a math tutor for a young student. The program should display two random numbers (in the rang

e of 1 through 500) to be added, such as: 357 + 123
The program should then pause while the student works on the problem. When the student is ready to check the answer, He/She can press a key and the program will display the correct solution: 357 + 123 = 480?
Computers and Technology
1 answer:
levacccp [35]4 years ago
7 0

Answer:

Code:

//<em>Needed Libraries</em>

#include <iostream>

#include <iomanip>

#include <cstdlib>

#include <ctime>

//<em>starting the program</em>

using namespace std;

int main()

{

//<em>Creating the variables needed</em>

double X,Y,Z;

//<em>command for generating random number every time the program runs. </em>

//<em>without it the program default value will be srand(1). </em>

srand(time(0));

// <em>printing the lines to show user what to do.</em>

cout << "Hello, Welcome to Math's Tutor " << endl;

cout << "I will be helping you learn addition today." << "\n\n";

cout << "I will display two random numbers, Solve for the answer." << endl;

//<em>doing the needed calculations and putting the sum in Z</em>

X = 1 + rand() % 500;

Y = 1 + rand() % 500;

Z = A + B;

//<em>printing the value for user to solve</em>

cout << "\n";

cout << X << " + " << Y << " = " << endl;

// <em>pausing the system for user to solve the problem and press any key</em>

system("pause");

//<em>showing the answer to the problem</em>

cout << X << " + " << Y << " = " << Z << endl;

return 0;

}

Explanation:

the above program will print some lines for showing user what to do and then displaying the numbers for user to solve for the answer and then let the user to see the answer when the user press any key.

the random number shown will be between 1 to 500. if the user want to change the range so

X = 1 + rand() % 500;

Y = 1 + rand() % 500;

Put the number for your range instead of 500. It can be 1000, 5000, etc it will increase the range if you want to decrease it then pu a lower number then 500 instead.

After it will allow the user to solve the problem. then show the answer when user press any key.

You might be interested in
A programming and software development professional would most likely help with
DiKsa [7]
A programming and software development professional would most likely help with
Testing a software program.
3 0
3 years ago
How can you prevent the flash from going off no matter how much light there is iready
Goshia [24]
There is a setting.
8 0
3 years ago
The most direct way for Jonothan to gain on-the-jib experience and earn money while attending school is to apply for
Sholpan [36]
A part-time job would provide on-the-job experience while also giving him a flexible schedule competing with school.
4 0
4 years ago
A technician installs a new WAP and users in the area begin to report poor performance. The technician uses a ping and only 3 of
krek1111 [17]

Answer: the correct answer is D. Spectrum Analyzer tool

Explanation:

A spectrum analyzer is a piece of electronic equipment that is used to gauge the magnitude (amplitude or strength) of a given input signal set against the full frequency range of the instrument. It is mainly used to measure the strength of the range of known and unknown signals.

4 0
3 years ago
Find the error in the statement below.
qwelly [4]

Answer:

I think it's C) The semi-colon should be a colon.

Explanation:

4 0
3 years ago
Other questions:
  • You support Richman Investments, a brokerage firm that employs 20 brokers. Each broker has his own client computer, and the firm
    15·1 answer
  • Under which condition below would you expect a glassy extrusive rock like obsidian to form?
    10·2 answers
  • Is the percentage of the original sample that successfully completed a survey.
    10·1 answer
  • The shortcut key combination to cut text is. Ctrl+C Ctrl+X Shift+V Shift+Y​
    10·2 answers
  • Cell A1 contains the formula "=10+D2". If you copied A1 to B3, what would be the formula in B3?
    10·2 answers
  • Convert the decimal number -12 to hexadecimal (2's complement)
    5·1 answer
  • A cubit is an ancient unit of length, roughly the distance between one’s fingers and elbow. The definition of one cubit is 18 in
    12·1 answer
  • Write a program that creates an integer array with 40 elements in it. Use a for loop to assign values to each element of the arr
    5·1 answer
  • Ayudaaaaa, Instale el software equivocado a mi tv westinghause con placa tp.Ms338.Pb801 y ahora queda en negro, ¿Cómo lo puedo s
    15·1 answer
  • Examples of applying successful visual design principles to bring a web page together are _________________. (Choose all that ap
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!