subject
Computers and Technology, 21.09.2020 16:01 yessy73

For this assignment, you will first prompt the user and read in two numbers from them. You need to check and make sure that both numbers are equal to or greater than 0 (can use an if or if/else statement for this). If so, multiply the two numbers together and print the new value to the screen. If the user enters a number lower than 0, remind the user that they need to enter a number greater than or equal to 0 and exit the program.
Sample Runs
Sample Program Run (user input is underlined)
Please type in two numbers: 100 250
100 * 250 = 25000
Exiting program.
Please type in two numbers: -1 27
Please only enter numbers >= 0.
Exiting program.
(Here's an alternative way to do the same thing:)
Please type in one number: 100
Please type in a second number: 250
100 * 250 = 25000
Exiting program.
Please type in one number: -1
Please type in a second number: 27
Please only enter numbers >= 0.
Exiting program.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
How can a user open a blank presentation? 1.on the file menu, click new, and then click recent templates 2.on the file menu, click new, and then click blank presentation 3. on the view menu, click templates, and then click recent templates 4. on the view menu, click samples, and then click blank presentation
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
You know the right answer?
For this assignment, you will first prompt the user and read in two numbers from them. You need to c...
Questions