I'm trying to do an assignment and I keep getting an error on my code that says "line 36: unrecognised types in comparison
'while ( dep_OR_withdraw != 0 ) { printf("\nEnter deposit (+) or withdrawal (-): ")' aborting compile". This is what I have and I can't figure out what is wrong.
Code:
currentBalance = initialBalance;
dep_OR_withdraw = 1; /*Dummy value used to get the loop started*/
while ( dep_OR_withdraw != 0 ) {
printf("\nEnter deposit (+) or withdrawal (-): ");
scanf("%f", &dep_OR_withdraw);
if (currentBalance < 0) {
printf("\n**I am sorry. You bounced your check.");
printf("$10 will be deducted.");
currentBalance = currentBalance + dep_OR_withdraw - FEE;
}
else
currentBalance = currentBalance + dep_OR_withdraw;
printf("Current Balance: %.2f", currentBalance);
}