#include<stdio.h> #include<conio.h> void main() { int i,n; clrscr(); printf("enter a range:"); scanf("%d",&n); i=1; while(i<=n) { if(i%2==0) printf("%d\n",i); i++; } getch(); } |
Output:-
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
Post a Comment