program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer Posted / pra japati apurv d
#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 ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is .obj file in c?
What is the difference between memcpy and memmove?
How do you determine a file’s attributes?
What is the method to save data in stack data structure type?
What is oops c?
can we implement multi-threads in c.
What do you mean by a local block?
what is a constant pointer in C
Is there sort function in c?
What is difference between Structure and Unions?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
What is typedef struct in c?
What is local and global variable in c?
What is an lvalue?
What is variable declaration and definition in c?