Here's the code:
It wont go past the while staement so all I get is:Code:#include <stdio.h> int main() { int account; float balance; float current; float items; float credit_total; float limit; printf("Enter account number (-1 to end): "); /* Ask for account number */ scanf("%d" , &account); while (account != -1);{ printf("Enter beginning balance: "); scanf( "%.2f" , &balance); printf("Enter total charges: "); scanf("%.2f", &items); printf("Enter credit limit: "); scanf(".2f" , &limit); printf("Enter total credits: "); scanf(".2f" , &credit_total); printf("Account: " , account); current = balance + items - credit_total; printf("Credit Limit: " , current); printf("Enter account number (-1 to end): "); scanf("%d" , &account); if(current > limit){ printf("Credit Limit Exceeded\n"); } } return 0; }
Enter account number:
Maybe someone can shed some light on why.
thank you so much,
Extro



LinkBack URL
About LinkBacks


