+ 1
Could any one develop the pattern of the following c ++program??
****1 ***21 **321 *4321 54321 ... Using for loop only...!
6 Answers
+ 1
Where is your attempt ?
+ 1
#include<iostream>
using namespace std;
int main()
{
int out;
for(out=5;out>=1;out--)
{
int in;
for(in=1;in<out;in++)
{
cout <<" ";
}
int a;
for(a=5;a>=out;a--)
{
cout <<a;
}
cout <<"\n";
}
return 0;
}
+ 1
M Rishi it's working perfectly.
Then what's the problem??
+ 1
But output is not same as the above sir
+ 1
Here you go đ
https://code.sololearn.com/cXnmvh8d7gIt/?ref=app
+ 1
Thank u so much sir.. đ