This code is designed for "C" weather thats that same as C sharp im not sure so sorry about that.
Im having trouble in this program where the user is to input eigther 'F' or 'S'. After you make the selection it just prompts "Please enter the amount owed" regardless if an 'F' or 'S' is inputted.
Can anyone see what I've done wrong? it looks logical to me.
Code:do { printf("Please enter 'F' for fee-paying or 'S' for Social Security: "); scanf("%c", &person.feeorss); person.feeorss = _toupper(person.feeorss); }while( ((person.feeorss != 'F') && (person.feeorss != 'S')) ); if(person.feeorss = 'F') { printf("Please enter the amount owed: "); fflush(stdin); scanf("%lg",&person.payment.amountowed); } else if(person.feeorss = 'S') { printf("Please enter Social Security Number: "); fflush(stdin); gets(person.payment.sscode); }




Reply With Quote