Question: Write a program that uses a repetition statement ( while loop ) that will print all of the numbers from 0 to 3 4 .

Write a program that uses a repetition statement (while loop) that will print all of the numbers from 0 to 34.
Now modify your program to print only the odd numbers between 0 and 34.(HINT: the modulus operator will come in handy here!)
What values should be in the output?
Put your code for this modified program here:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!