Thursday, March 8, 2012

Count backwards of any no.

//Count backwards of any no using a for loop.
#include<stdio.h>
#include<conio.h>
main()
{ int i,n;
 printf("Enter any no-");
 scanf("%d",&n);
 printf("backwards of no--");
 for(i=n;i>=0;i--)
 { printf("%d\n",i);
}
getch();
}

No comments:

Post a Comment