program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer Posted / lohith
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 43 Yes | 9 No |
Post New Answer View All Answers
What is huge pointer in c?
What is the difference between constant pointer and constant variable?
How the c program is executed?
What are register variables in c?
How can I delete a file?
Can you apply link and association interchangeably?
What is the meaning of typedef struct in c?
Can a pointer be volatile in c?
what is ur strangth & weekness
Can a program have two main functions?
How can I read a binary data file properly?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is static and volatile in c?
Can we add pointers together?
Explain bit masking in c?