Question: 1. Write C++ program that will ask user for two integers and then use for loop to print all the integers between the two values
1. Write C++ program that will ask user for two integers and then use for loop to print all the integers between the two values entered by user (inclusive). For example if user enters 10 and 3, the program should print 3, 4, 5, 6, 7, 8, 9, 10. For simplicity print the numbers one per line.
2. Write C++ program that will ask user for a sequence of positive integers (one at a time). The program should stop when user enters a negative number and print out how many positive numbers user entered. For example if user enters 2, 6, 1, 10, -3. The program should print 4.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
