a simple c program using 'for' loop to display the output
5
4
3
2
1
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / rohit dilip kakade
#include<stdio.h>
#include<conio.h>
void main(void)
{
int i;
clrscr();
for(i=5;i>0;i--)
{
printf("
%d",i);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
How can you invoke another program from within a C program?
Is main is user defined function?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
in b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first a) 6.6/a b) 2*a c) 3*c d) 2/n
How will you divide two numbers in a MACRO?
What are the types of macro formats?
What is void main ()?
What does *p++ do?
every function has return the value?
What is spaghetti programming?
Give a fast way to multiply a number by 7
15 Answers Accenture, Aricent, Microsoft,
How can I open a file so that other programs can update it at the same time?