- 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
-
- 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
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