program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer Posted / jayaraj.s
#include <stdio.h>
main()
{
int a,b;
for(a=1;a<=5;a++)
{
printf("\n%d",a);
for(b=1;b!=a;b++)
{
printf("%d",a);
}
}
getch();
}
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What is the purpose of & in scanf?
What is the use of typedef in c?
What does c mean in standard form?
Can a pointer point to null?
Is multithreading possible in c?
What does the message "automatic aggregate intialization is an ansi feature" mean?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
How can I find out if there are characters available for reading?
what is use of malloc and calloc?
What is equivalent to ++i+++j?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
find out largest elemant of diagonalmatrix
Is sizeof a keyword in c?
What does 4d mean in c?