program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / rajarshi bhadra
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=5;i>=0;i--)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
Where are the auto variables stored?
What is 2 d array in c?
What is a macro in c preprocessor?
What is variable initialization and why is it important?
What does the c preprocessor do?
Is exit(status) truly equivalent to returning the same status from main?
What is use of integral promotions in c?
What is a stream?
Why can’t constant values be used to define an array’s initial size?
Give the rules for variable declaration?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
how to find anagram without using string functions using only loops in c programming
What are enumerated types?
What is unary operator?
What is default value of global variable in c?