problem with code dont know whats wrong with the syntex
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include <iostream>
#include <cmath>
int main()
{
using namespace std;
int rows, columns;
char thechar;
cout << "how many rows: ";
cin >> rows;
cout << endl << "How many columns: ";
cin >> columns;
cout << endl << "what Symbol: ";
cin >> thechar;
for(int i = 0; i < rows; i++)
{
for (int j = 0; j < columns; j++;)
cout << thechar << endl;
}
system("pause");
return 0;
}
|
mainly on the line with the nested 2nd for loop
(i know iits a pointless code its for shear practice of nesting for loops)
the extra ; after j++
thanks for some unknown reason i thought that was supposed to be there.
Topic archived. No new replies allowed.