55555 4444 333 22 1
#include <stdio.h>
int main()
{
int i, j;
for(i=5;i>=1;i--)
{
for(j=1;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
can we also write the 2nd for loop statement as for(j=1;j>=i;j--) ?
ReplyDeletetry yourself
DeleteYou can also try this for the above output
ReplyDeletefor(i=5;i>=1;i--)
{
for(j=i;j>=1;j--)
{
printf("%d",i)
}
printf("\n");
}
#include
ReplyDeleteint main()
{
int i, j;
for(i=5;i>=1;i--)
{
for(j=i;j>=1;j--)
{
printf("%d",i);
}
printf("\n");
}
return 0;
}
its giving the same output
****1
ReplyDelete***22
**333
*4444
55555
answer fro this pattren please
This comment has been removed by the author.
ReplyDelete