- #1
ineedhelpnow
- 651
- 0
Modify the program to print the U.S. presidential election years since 1792 to present day, knowing such elections occur every 4 years. Don't forget to use <= rather than == to help avoid an infinite loop.
how do i do this?
Code:
#include <iostream>
using namespace std;
int main() {
int electYear = 0;
electYear = 1792;
// FIXME: Put the following in a while loop
cout << electYear << endl;
return 0;
}
how do i do this?