37. WRITE A C PROGRAM TO PRINT 10 TO 1 NUMBERS USING FOR LOOP

/*C program to Print 10 to 1 Numbers Using for Loop*/

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("\n"); //for new line
// For loop
// (initialize; condition ; increment)
for(n=10;n>=1;n--)
{
printf(" %d\n",n);
}
getch();
}

output

10 








1

Comments