Sunday, July 31, 2016

Program in C to display first 10 even numbers using while loop

/* Program in C to display first 10 even numbers */
#include<stdio.h>
#include<conio.h>
void main()
{
    int a=2,i=1;
    while(i<=10)
    {
        printf(" %d ",a);
        a=a+2;
        i++;
    }
    getch();
}

0 comments:

Post a Comment