I would like to know where I am going wrong. I know the logic is correct.
for (i = 1; i <= rows; i++) {
for (j = 1; j <= columns; j++) {
if (i == 1 || i == rows || j == 1 || j == columns) {
cout << "*";
}
else {
cout << "";
}
}
cout << endl;
}
Aucun commentaire:
Enregistrer un commentaire