11111 2222 333 44 5
#include <stdio.h>
int main()
{
int i, j;
for(i=1;i<=5;i++)
{
for(j=5;j>=i;j--)
{
printf("%d",i);
}
printf("\n");
}
return 0;
}
Related Links:
- More Number Pattern Programs
- Star Pattern Programs in C
- Alphabet Pattern Programs in C
- Series Programs in C
void generate6(int n)
ReplyDelete{
static int a;
a=n;
for(int i1=1;i1<=n;i1++)
{
cout<<endl;
for(int j1=1;j1<=a;j1++)
{
cout<<i1;
}
--a;
}
}
#include
ReplyDeleteint main()
{
int i,j;
for(i=1;i<=5;i++){
for(j=i;j<=5;j++)
{
printf("%d",i);
}
printf("\n");
}
return 0;
}
This comment has been removed by the author.
ReplyDeleteThere should be j>=1 instead of i
ReplyDeletecan u explain how to do same problem using user defined function please
ReplyDelete5
ReplyDelete4 3
3 2 1
3 4
5
How to print this pattern in c language
11111 11111
ReplyDelete2222 2222
333 333
44 44
5 5