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
How many types of arrays are there in c?
Explain Basic concepts of C language?
what is uses of .net
Define VARIABLE?
Explain how to reverse singly link list.
What does volatile do?
Simplify the program segment if X = B then C ← true else C ← false
What are the different types of constants?
Why is #define used?
What is typedef?
Can true be a variable name in c?
What is a good way to implement complex numbers in c?
Explain how does free() know explain how much memory to release?
What is scanf_s in c?
What is the benefit of using an enum rather than a #define constant?