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]
3 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]3 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
Pleeeese help me for these questions
geniusboy [140]

1 Account

2 online

3 access

4 password

5 internet

6 email

4 0
3 years ago
What two skills are most important for a meteorologist
Komok [63]

being able to find out the weather.


being able to wear fancy suits.

7 0
3 years ago
Read 2 more answers
In a non-formatted/standard template, if the number 25 is converted to text format, the
goldfiish [28.3K]
<h2>The alignment of the text will be "left" by default</h2>

Explanation:

  • In Excel or spreadsheet, if any number is entered, it will automatically be aligned to right because right alignment is preferable for the numbers.
  • In case of any alignment is mentioned in the cell in prior to entering text or if the type of data is changed after or before entering the text, then the text is aligned accordingly.
  • According to the given scenario, a number "25" is entered and it is converted to text. So a text format will preserve the alignment as entered. By default it will be "left" aligned.

3 0
3 years ago
Java IntelliJ
andrew11 [14]

Answer:

Your solution is ready.

Explanation:

Visit: gotit-pro.com/design-a-gui-interface-to-accept-user-input-and-add-the-data-to-a-cell-phone

And get the complete working code for this assignment.

Feel free to reach out to me for fastest, top-notch and impeccable homework and exams help including Pearson Labs etc.

Thanks and Best Regards: Your Friendly Study Co-Pilot

3 0
3 years ago
Examine about the Internal &amp; External Fragmentation methods give an example for each. essay​
Tju [1.3M]

Internal Fragmentation occurs when a process needs more space than the size of allotted memory block or use less space. External Fragmentation occurs when a process is removed from the main memory. Internal Fragmentation occurs when Paging is employed. External Fragmentation occurs when Segmentation is employed.

3 0
3 years ago
Other questions:
  • Jared does not update his computer’s system software. What threat does his computer face?
    9·1 answer
  • You can toggle between different types of references by pressing the ____ key on your keyboard.
    15·1 answer
  • In Java
    6·1 answer
  • In the code snippet, what is the “win” part called in programming?
    12·1 answer
  • The phone in your hand is a computer. So too is the machine that occupies a 100,000 square foot data center. Given their vast di
    14·1 answer
  • If you wanted to create a line of code that would add ten to the user’s current score, which code should you use?
    12·2 answers
  • 4.5 code practice computer science
    5·1 answer
  • Dose anyone know how to change username, grade level, and gender here? I have tried it in the change preferences and it says it
    8·2 answers
  • Please HELP me it a test and it due rn. Please no links
    9·1 answer
  • Write the icon of full justification​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!