Question: I need help with Exercise 4 & 7. I am not sure how I got the other loops to run but I did. I can't

I need help with Exercise 4 & 7. I am not sureI need help with Exercise 4 & 7. I am not sure how I got the other loops to run but I did. I can't get the while loop to run correctly and exercise 7 just confused me. Beware, I am new to coding and only have around less than a year of experience so I'm learning this real fast due to the amount of work being pushed at me. Thank you for helping, I appreciate it.

Exercise 4: 'While' Loops (10 points) Write a C++ program that prints every integer between 330 and 550, inclusive. Use a while loop. Exercise 5: 'Do While' Loops (10 points) Provide a solution to the previous exercise that uses a do-while loop. Exercise 6: 'For Loops (10 points) Provide a solution to the previous exercise that uses a for loop. Exercise 7: Guess-the-Number Game (10 points) Write a program that implements Guess-the-Number game. The program should enter a loop that starts by printing "What year did Pakistan achieve independence?" After printing this, it reads the user response. (Use cin >> n to read the user response.) If the user enters a value less than 1947, the program prints "too early" and continues the loop. If the user enters a number larger than 1947, the program prints "too late" and continues the loop. If the user enters the number 1947, the program prints "you got it" and then terminates

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 Databases Questions!