#include<stdio.h>
#include<conio.h>
int main()
{
int
i,n; // declare two integer type
variables
clrscr(); // clears the output window
printf("\n
Enter the number : ");
scanf("%d",&n); // input the value of n
printf(“\n”); // will break the line on output window
for(i=2;i<=n;i++)
{
if(i%2==0)
{
printf("
%d ",i);
}
}
getch();
return
0;
}
No comments:
Post a Comment