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
"Margaret has $3,200 cash after selling off her television, DVD player, and computer. She has debts of $4,800 owing to the follo
serg [7]

Answer: Hyatt's  will be able to collect $1,365

Explanation: Composition Agreement is a kind of agreement reached between a debtor and its creditors. it a kind of agreement whereby the debtor and creditors agree to collect a percentage of their debts to fully settle their debts from the creditor.

For instance Margaret with a cash of $3,200 to settle a debt of $4,800.

In this case Margaret can decide to pay 65% of the total debts to settle the final debts. Here, Hyatt's  will be able to collect $1,365 as full settle of his debt.

5 0
3 years ago
Explain the danger leaks pose when operating a tractor.
Romashka [77]
Read and follow procedures as outlined in the operator's manual. By being familiar with the operating features of a tractor, the operator will develop confidence when the tractor is driven under adverse conditions. Learn the location and purpose of all of the guages and controls as well as other indicators. Knowing where the controls are by memory can allow you to react more quickly in an emergency situation. There have been accident situations where individuals have become entangled in machinery or the power takeoff shaft and rescuers or family did not know how to disengage the equipment. Family members should be showed how to shut down equipment or disengage the PTO in case of emergency.
Study the various decals on your equipment. They may point out DANGER, WARNING and CAUTION for various points on the tractor. Have an experienced tractor operator with you as you review the various decals and ask questions!
5 0
3 years ago
What is the exact volume of the cone​
tresset_1 [31]

Answer: You're going to have to put parameters.

Explanation: Anyways, the formula for solving a cone is V=\pi r^{2} \frac{h}{3} . Where r is the radius of the base of the cone and h is the height from the center of the base to the tip of the cone. You can google "cone volume formula" and google will show a cone volume calculator and you can type in the parameters.

7 0
3 years ago
In every programming language, when you access data stored in an array, you must use a ____ containing a value that accesses mem
Mariulka [41]
An array is an indexed collection of data elements. First you must declare an array, give its name and data. <span>Once your arrays are declared, you access the elements in an array with the array name, and the index number inside brackets [ ].
So, in every </span><span>programming language, when you access data stored in an array, you must use a command [] (brackets) containing a value that accesses memory occupied by the array.</span>
4 0
3 years ago
You are asked to assume the role of an employee of the DigiFirm Investigation Company. As part of its community outreach effort,
kirill [66]

Answer:

1.  To trace an email we need to examine the header part of the email. By examine the header of an email we could extract the sender, subject and other important credentials related to that email.  

2. The command to trace the email id is “whois” command.

 First open the email client and find the IP address of the received email that need to be traced.  The command “whois” IP address gives the registration information of that IP address.

 3.  Reverse address/email search is the procedure used by the experts to find the origin or the ownership of the email.  Rather than tools websites are more use full in the reverse address search.

http://reverse.addresssearch.com, www.iplocation.net, etc. are good to find the ownership of an email.

4. We need to set up mail server to send, receive and to explore various activities associated with an email.  The other related purpose servers like SMTP server, HTTP server , etc are also required to assist large organizations.  The mail server can be a stand-alone computer or a collection of computer and servers.

 5.  The executable files should be examined thoroughly in the server, it can be dangerous malwares.  The examination is mainly done by scanning for malicious words and sender address.  Since many mail providers does not allow executable files to send, so the attackers are using other files also as a carrier of the malwares, so now every emails should be subject to deep examination using some malware scanner.  

6.   By the time of examination the some of the legitimate mails may also come under the suspect list so further check is needed there.  At the same time the attacks can be from legitimate sources also this could be go un-noticed; this should be also a challenge to face in the stage of e-mail examination.

8 0
3 years ago
Other questions:
  • Amy has decided to use a dark background and light colored text for her prensentation. Which toolbar option will let her change
    5·1 answer
  • An example of cooler red is
    8·1 answer
  • This folder is ndownload and it isn't like download file
    14·1 answer
  • Does virtualization impact the design of programs on behalf of the process/threading model?
    12·1 answer
  • "The correct syntax for passing an array as an argument to a method when a method is called and an array is passed to it is: "
    15·1 answer
  • Write a recursive function that calculates the sum 11 22 33 ... nn, given an integer value of nin between 1 and 9. You can write
    10·1 answer
  • TRUE OR FALSE - SQL language is used to query data in a Relational Database?
    5·1 answer
  • Write a script that inputs a line of encrypted text and a distance value and outputs plaintext using a Caesar cipher. The script
    11·1 answer
  • WHAT IS THE LOCATION OF “A”. ON THE GRID?
    15·2 answers
  • Any movie/show suggestions??
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!