Monday, 31 December 2018

Filled Under:

Even number upto a range[c programming examples with output]

C programming examples with output

Even number upto a range
Program

#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
clrscr();
printf("Enter the range: ");
scanf("%d",&a);
b=1;
while(b<=a)
{
        if(b%2==0)
          printf("%d/t",b);
          b++;
}
getch();
}

Output
Enter the range:10

0 komentar:

Post a Comment