I'm unable to find the correct way to write these loops. Could anyone help?
5. Write a program that reads a sequence of pairs of positive integer values. For each pair, print all the
integer values starting with the first and ending with the second on a single line. If the two values are
the same, terminate your program. For example, if the input is
8 12
9 2
-2 5
0 -4
8 8
then print:
8 9 10 11 12
9 8 7 6 5 4 3 2
-2 -1 0 1 2 3 4 5
0 -1 -2 -3 -4
3. Write a program that reads a sequence of positive integers and prints out their sum, except that if the
same number occurs several times consecutively, ignore all but the first. Assume an input of 0 marks
the end of the input. For example, if the input is 3 8 5 5 4 9 1 1 1 1 8 0 then you should print 38 (i.e.,
ignore one of the 5's and three of the 1's).
1. Write a program that reads a sequence of positive integer values from the user and prints the single
line “the numbers are increasing” if each value entered is strictly greater than the previous one
entered. If the numbers are not increasing, print the single line “the numbers are not increasing”.
When the user enters the number 0 that indicates the end of the input and not considered w.r.t.
whether the numbers are increasing or not.
For example, if the input is 4 7 9 10 14 0, then your program should print: the numbers
are increasing. If the input is 1 2 2 3 0, then your program should print: the numbers
are not increasing. If the input is 1 7 4 9 3 0, then your program should print the:
numbers are not increasing. You must read all the numbers before you print anything.