hey mates I need some help and have some question.
Code:
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
int in = 0;
cout << "type a value" << endl;
cin >> in;
for(int j = 0; j < in; j++)
for(int i = 0; i <= j; i++)
cout << "*";
cout << endl;
return 0;
}
Is there a way to loop this program til I type the integer value 0, it will shut down?
I would appreciated if anyone would add this to my code.
A question
for(int j = 0; j < in; j++)
for(int i = 0; i <= j; i++)
can anyone tell my in simplified laughed what they do? especially the second one, the first one kind of shows shows the "*" given what value you type, not sure.
Cheers