problem coding odd loop
hi,
it is suppose to be an odd loop but it is terminating after the first output,plz tell me where is
the mistake:
include <stdio.h>
main()
{
char another='y';
int num;
while(another=='y')
{
printf("Enter a number\n");
scanf("%d",&num);
printf("square of %d is %d\n",num,num*num);
printf("\nWant to enter another number y/n\n");
scanf("%c",&another);
}
|