#include<stdio.h>
#include<conio.h>
main()
{
int i,a,b,d;
char Out='Y';
do
{
printf("Enter Number : ");
scanf("%d",&a);
if (a%2==0)
{
printf("%d is even number\n",a);
}
else if (a%2!=0)
{
printf("%d is odd number\n",a);
}
printf("Do you want to continue(Y/N):" );
//scanf("%c",&Out);
Out=getche();
printf("\n");
}
while(Out=='Y');
getch();
}
#include<conio.h>
main()
{
int i,a,b,d;
char Out='Y';
do
{
printf("Enter Number : ");
scanf("%d",&a);
if (a%2==0)
{
printf("%d is even number\n",a);
}
else if (a%2!=0)
{
printf("%d is odd number\n",a);
}
printf("Do you want to continue(Y/N):" );
//scanf("%c",&Out);
Out=getche();
printf("\n");
}
while(Out=='Y');
getch();
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น