I have the following code:
Code:
do
{
printf("\nEnter fraction %d: ", i + 1);
scanf("%d %d/%d", &frac[i].whole, &frac[i].num, &frac[i].den);
printf("\nYou entered: %d %d/%d", frac[i].whole, frac[i].num, frac[i].den);
printf("\nEnter 'Y' to re-enter last fraction [anything else to continue]: ");
rewind (stdin);
//check = getchar();
}
while (getchar() == ('y' || 'Y'));
now, obviously, something's wrong with
>>while (getchar() == ('y' || 'Y'));
I wanted to do this without assigning the value returned by getchar to an int or char, is ther a way to do this?