Question: Write a program which repeatedly prompts the user for an integer. If the integer is even, print the integer. If the integer is odd,
Write a program which repeatedly prompts the user for an integer. If the integer is even, print the integer. If the integer is odd, don't print anything. Exit the program if the user enters the integer 99. [use break and continue] Q5. Write a program to sum the following series: 1 3 5 7 9 11 +-+-+ + 95 97 + + + 3 5 7 9 11 13 97 99 1 Q6. Write a nested for loop that displays the following output: 1 2 4 1 2 1 4 8 2 4 8 16 1 27 1 2 4 2 ... 1 2 4 8 16 32 + 1 2 4 2 8 4 16 8 32 32 16 64 128 64 32 16 8 1 2 1 4 8 16 32 16 64 1 2 4 8 1248 1 2 4 1 2 1
Step by Step Solution
3.40 Rating (144 Votes )
There are 3 Steps involved in it
Solutions Step 1 Q1 code Q4 while True n intinput if n 99 break if n 2 1 continue printn ... View full answer
Get step-by-step solutions from verified subject matter experts
