Scusami ma sono tornato a postare nel forum dopo molto tempo che mi sono registrato.Certe regole le avevo dimenticate...
codice:
#include <stdio.h> main() { int accountnumber; float beginningbalance,totalcharges,totalcredits,creditlimit,Balance; printf("Enter account number (-1 to end):"); scanf("%d", &accountnumber); while(accountnumber!= -1){ printf("Enter beginning balance: \n"); scanf("%.2f",&beginningbalance); printf("Enter total charges: \n"); scanf("%.2f", &totalcharges); printf("Enter total credits: \n"); scanf("%.2f", &totalcredits); printf("Enter credit limit: \n); scanf("%.2f",&creditlimit); Balance=beginningbalance + totalcharges - totalcredits;} if (Balance > creditlimit){ printf("Account:%.2f\n" ,accountnumber); printf("Credit limit:%.2f\n" ,creditlimit); printf("Balance:%.2f\n", Balance); printf("Credit Limit Exceeded\n");} else printf(" \n"); }
Mi da una serie di errori non uno (scusate):
1)Unterminated string or char const.
2)no type specified.Defaulting to int.
3)type error in argument 1 to "printf";found 'int' expected 'pointer to char'.