[29 / 3 / 17]
Quoted By: >>17272989 >>17273018 >>17273062 >>17273110 >>17273443 >>17273904 >>17274998 >>17275229 >>17276156
#include <iostream>
using namespace std;
int main() {
int n = 8, i, j, x;
for (i = 0; i < n; i++) {
if (n - i >= 1) {
j = n - (n - (n - 1));
}
for (x = 0; x < j; x++) {
cout << "*";
}
cout << "\n";
}
}
Why doesn't this C++ program output to draw a half triangle in the console? ChatGPT says it should.
using namespace std;
int main() {
int n = 8, i, j, x;
for (i = 0; i < n; i++) {
if (n - i >= 1) {
j = n - (n - (n - 1));
}
for (x = 0; x < j; x++) {
cout << "*";
}
cout << "\n";
}
}
Why doesn't this C++ program output to draw a half triangle in the console? ChatGPT says it should.