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 a program flowchart?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
How many levels of pointers have?
What is a pointer in c plus plus?
Is it better to bitshift a value than to multiply by 2?
How do I use strcmp?
What is substring in c?
What is uint8 in c?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
How can you increase the size of a dynamically allocated array?
What is restrict keyword in c?
Where we use clrscr in c?
main() { printf("hello"); fork(); }
differentiate built-in functions and user – defined functions.
What is the return type of sizeof?