I'm making my homework where i need to do a simple tree like pattern with "*", However when i open it it doesn't work, but when i copy the outcome, it looks correctly on discord,
It should look like on discord, but Im afraid that when i turn it in, they'll say its wrong or something
code: #include <iostream>
using namespace std;
int main() {
double n;
cout << "Podaj n: ";
cin >> n;
for (double t = 1; t <= n; t++) {
for (double j = 1; j <= t; j++) {
int spacja = n - j;
for (double s = 0; s < spacja; s++)
cout << " ";
for (double k = 0; k < j; k++)
cout << "*";
cout << "\n";
}
}
}