click on this link......

LinkGrand.com

Friday, 11 January 2013

To print even number series from 0,2,4,6,8,10,12,14.....n using 'for' loop

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

program for even number series
program for even number series
Output for even number series
Output for even number series

       

1 comment: