Pattern number &

#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;

for(int i=n;i>=1;i–)
{
for(int j=1;j<=i;j++)
{

cout<<j;

}
for(int k=i+1;k<=n;k++)
cout<<"*";

for(int k=i+2;k<=n;k++)
cout<<"*";
cout<<endl;

}
return 0;

}
what is wrong in this program???

@Ashish2001 you forgot the spaces .
i hope its cleared if yes dont forget to mark it as resolved :smiley:

but in the problem it is not mentioned to give spaces

i think its written space separated i/p o/p @Ashish2001

ok so i ll not get 100 right?

you will get 100 after adding spaces
is it ok?

yup thanks
for the help!

np just mark the doubt resolved @Ashish2001 :smiley: