Question
Prompt the user to enter an integer Then, prompt the user to enter a positive integer n2. Print out all the numbers that are entered
Prompt the user to enter an integer
Then, prompt the user to enter a positive integer n2.
Print out all the numbers that are entered after the last occurrence of n1 and whether each one is even or odd
If n1 does not occur or there are no values after the last occurrence of n1, print out the message as indicated in the sample runs below.
Sample:
Enter n1: -2
Enter n2: 7
Enter 7 values: -2 3 3 -2 4 3 6
4 is even
3 is odd
6 is even
Enter n1: 100
Enter n2: 6
Enter 6 values: 101 2 -7 100 9100
No values after 100
Enter n1: 5
Enter n2: 3
Enter 3 values: 4 5 104
9 does not occur
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started