dear all,
although it may seems easy ...but can any body tell me why ,when i excute this code it enters in infinite loop when i enter the character (a)...
#include <stdio.h>
void main(void)
{
int c = 100 ;
while ( c != 'a' )
{
scanf("%d",&c ) ;
if( c%2 != 0)
printf("Odd\n"
else
printf("Even\n"
}
printf("GoodBye\n"
}
thanx in adnace ...
Mohammed Al-Tobji
Electrical Engineer
although it may seems easy ...but can any body tell me why ,when i excute this code it enters in infinite loop when i enter the character (a)...
#include <stdio.h>
void main(void)
{
int c = 100 ;
while ( c != 'a' )
{
scanf("%d",&c ) ;
if( c%2 != 0)
printf("Odd\n"
else
printf("Even\n"
}
printf("GoodBye\n"
}
thanx in adnace ...
Mohammed Al-Tobji
Electrical Engineer