a simple c program using 'for' loop to display the output
5
4
3
2
1
Answer Posted / prayashjeet chanda
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int num,i;
printf("\nEnter a number: ");
scanf("%d",&num);
for(i=num;i>0;i--)
{
printf("\n%d",i);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a program which returns the first non repetitive character in the string?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
What are void pointers in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
Why is event driven programming or procedural programming, better within specific scenario?
Why is void main used?
what are the facialities provided by you after the selection of the student.
what is the function of pragma directive in c?
Write a program to swap two numbers without using the third variable?
What is a void pointer in c?
What are the types of pointers?
What do you understand by normalization of pointers?
explain what are actual arguments?
How can I do peek and poke in c?
What is use of integral promotions in c?