Tell me a C program to display the following Output?
1 1 1 1 1
2 2 2 2
3 3 3
4 4
5

Answer Posted / sreesen@ymail.com

#include<stdio.h>
void main()
{
int i,j,k=5;
for(i=1;i<=5;i++)
{
for(j=k;j<=0;j--)
{
printf("%d",i);
}
printf(""\n);
k--;
}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is operator promotion?

619


What is the difference between strcpy() and memcpy() function in c programming?

618


praagnovation

1769


What are the preprocessor categories?

628


What oops means?

572






What are shell structures used for?

592


What is the scope of an external variable in c?

561


What is string function in c?

529


How can I pad a string to a known length?

603


What are register variables in c?

564


Why do we use namespace feature?

573


Write the control statements in C language

639


Explain 'far' and 'near' pointers in c.

695


Place the #include statement must be written in the program?

563


What is the use of in c?

568