+ 1
How can print this figure by using loop
* * * * * *
2 Respuestas
+ 1
hi this is sample code
#include <iostream>
using namespace std;
#define ROW 3
int main() {
int i,j,k=0;
for(i=0;i<ROW;i++)
{
for (j=ROW-k;j>=0;j--)
cout <<"\t";
for(k=0;k<i+1;k++)
cout<<"*";
cout <<endl;
}
return 0;
}
+ 1
but why
i=0;i <row
I can do this
i=1;i <=row