program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer Posted / devi
#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 ? | 19 Yes | 2 No |
Post New Answer View All Answers
What is output redirection?
Disadvantages of C language.
Explain what is the benefit of using enum to declare a constant?
What is the difference between union and structure in c?
What is external variable in c?
Why we not create function inside function.
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What is the purpose of realloc()?
What is pointers in c?
Explain the bubble sort algorithm.
Is c easy to learn?
Explain what is the difference between text files and binary files?
What is the difference between Printf(..) and sprint(...) ?
diff between exptected result and requirement?
What is formal argument?