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 does #pragma once mean?
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is the difference between abs() and fabs() functions?
What is the process to create increment and decrement stamen in c?
What is the advantage of a random access file?
Can one function call another?
What is include directive in c?
Suggesting that there can be 62 seconds in a minute?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is c mainly used for?
Who developed c language?
What is a program?
What is the mean of function?
simple program of graphics and their output display
Apart from dennis ritchie who the other person who contributed in design of c language.