4. Write a program that does the following: a. Ask the user for two numbers between 0 and 1000, and store their answers

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

4. Write a program that does the following: a. Ask the user for two numbers between 0 and 1000, and store their answers

Post by answerhappygod »

4 Write A Program That Does The Following A Ask The User For Two Numbers Between 0 And 1000 And Store Their Answers 1
4 Write A Program That Does The Following A Ask The User For Two Numbers Between 0 And 1000 And Store Their Answers 1 (27.7 KiB) Viewed 42 times
4. Write a program that does the following: a. Ask the user for two numbers between 0 and 1000, and store their answers using two variables **Hint: You need to cast your user's input into an int. b. If the numbers are not between 0 and 1000, print out a message to the user that says their input is invalid **Hint: You could use a logical operator (and, or, not) here C. Otherwise, subtract the second number from the first number (i.e. first number - second number), and print out 'negative' or 'positive' (all lowercase) to indicate whether the difference is either negative or positive
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply