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
How do shell structures work?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is a scope resolution operator in c?
What is the process to create increment and decrement stamen in c?
What is the condition that is applied with ?: Operator?
Can you explain the four storage classes in C?
Why are algorithms important in c program?
What is the acronym for ansi?
What is the use of pointers in C?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
How can I trap or ignore keyboard interrupts like control-c?
Why do we use main function?
Is calloc better than malloc?
What is the total generic pointer type?