I need to fix each of these codes so that it will print numbers between 1 and 10. what is wrong?
andCode:#include <iostream> using namespace std; int main (void){ for (int n=1; n<=10; n++); cout << n << endl; return 0; }
any help would be appreciated, thanksCode:#include <iostream> using namespace std; int main (void) { n=1; while (n<11) cout << n << endl; n++; return 0; }