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 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
question
Computers and Technology, 22.06.2019 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Which of the following statements best describes it careers?
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
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
question
History, 30.07.2019 13:00
question
English, 30.07.2019 13:00
Questions on the website: 13722360