+ 1

i want to show this output ***** **** *** ** * * ** *** **** *****

how is this

29th Aug 2016, 2:33 PM
Santosh Kumar
Santosh Kumar - avatar
3 Réponses
+ 7
int main() { int n=5; // cin>>n; for(int i=0;i<n;i++){ for(int j=n;j>i;j--){ cout<<"*"; } cout<<"\n"; } for(int i=0;i<n;i++){ for(int j=0;j<=i;j++){ cout<<"*"; } cout<<"\n"; } return 0; }
29th Aug 2016, 5:57 PM
Akash Gupta
Akash Gupta - avatar
+ 3
#include <iostream> using namespace std; int main() { for (int i = 1; i <= 5; i++) { for (int j = i; j <= 5; j++) { cout << "*"; } cout << endl; } //–------------------- for (int i =1; i <= 5; i++){ for (int j = 1; j <= i; j++) { cout << "*"; } cout << endl; } return 0; }
31st Aug 2016, 10:07 PM
Davood Abdollahi
Davood Abdollahi - avatar
0
Can you teach me..?
31st Aug 2016, 4:42 PM
Såm ÎZ ßãÇk
Såm ÎZ ßãÇk - avatar