Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- float wl=1.5;
- int yrlm;
- cout << "Please enter the final year :";
- cin >> yrlm;
- while (yrlm < 1)
- {
- cout << "Please enter a parameter bigger or equal than 1." << endl;
- cout << "Please enter the final year :";
- cin >> yrlm;
- }
- for (int year=1; year <= yrlm; year++)
- {
- cout << "The year is " << year << " and the water level is: " << wl << endl;
- wl = wl+1.5;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement