+ 1

How can print this figure by using loop

* * * * * *

25th Mar 2017, 9:34 PM
Bts...
Bts... - avatar
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; }
25th Mar 2017, 11:03 PM
mcicek
mcicek - avatar
+ 1
but why i=0;i <row I can do this i=1;i <=row
26th Mar 2017, 4:49 AM
Bts...
Bts... - avatar