I wrote this code for the CPP Tutorial 5.5 Question 4:
#include <iostream>
using namespace std;
void loop2(int x)
{
string results;
int i = x;
while (i <= x) {
results = results + "X";
}
cout << results;
}
int main()
{
cout << "Read To Go!" << "/n" <<;
int outer = 1;
while (outer <= 5)
{
// loop between 1 and outer
int inner = 1;
while (inner <= outer)
loop2(5 - inner);
cout << inner++ << " ";
// print a newline at the end of each row
cout << "\n";
++outer;
}
return 0;
}
But It won’t stop flagging “cout << “Read To Go!” << “/n” <<;” but you see idk why. Can someone plz help me? Ya’ll are my last resort.
NOTE: This code is still WIP the issue is it won’t compile not that it isn’t complete.