click on this link......

LinkGrand.com

Friday 11 January 2013

To print series from n to 1 using 'for' loop

#include<stdio.h>
#include<conio.h>
void main()
{
             int i,num;
            printf("Enter the last number:");
           scanf("%d",&num);
             for(i=num;i>=1;i--)
             {
                      printf("\n%d",i);
            }
            getch();
}

program to print series n to 1 using for loop
program to print series n to 1 using for loop
output for series n to 1 using for loop
output for series n to 1 using for loop

       

No comments:

Post a Comment