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
Difference between constant pointer and pointer to a constant.
What is the use of a semicolon (;) at the end of every program statement?
What is the difference between text and binary modes?
Can the size of an array be declared at runtime?
What is the use of the function in c?
What is nested structure with example?
write a program in c language to print your bio-data on the screen by using functions.
Explain logical errors? Compare with syntax errors.
to find the closest pair
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
Is c call by value?
Can true be a variable name in c?
Explain what are the __date__ and __time__ preprocessor commands?
Is c# a good language?
What is far pointer in c?