0

How to this program form

* * * * *

5th Nov 2016, 5:16 AM
Anand
Anand - avatar
1 Réponse
+ 2
#include <iostream> using namespace std; int main() { for(int i=0;i<3;i++){ for(int j=2-i;j>0;j--) { cout<<" "; } cout<<"*"; for(int k=0;k<2*i-1;k++){ cout<<" "; } if(i!=0) cout<<"*"; cout<<endl; } return 0; }
5th Nov 2016, 5:43 AM
kamal joshi
kamal joshi - avatar