Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago