The Question

A Bank charges $10 per month plus the following cheque fees for a commercial
checking account:
$ 12 for each fewer than 25 cheques
$ 15 each for 26-40 cheques
$ 18 each for 41-59 cheques
$ 20 each for 60 or more cheques
The bank also charge $15 if the balance for the amount falls below $500 (before any cheque fees
are applied).
Write a program that ask the user for the beginning balance and the numbers of cheques written.
Compute and display the bank services fees for the month.

My Program

#include<stdio.h>
main()
{

int checks;
int balance, fee = 10;

printf("\nHow many checks have you signed this month:");
scanf("%d",checks);

if(checks >= 0){
printf("enter the starting balance:");
scanf("%d",balance);
}
if(balance >= 0){
balance = balance - fee;
}
if(balance < 500){
fee = fee + 15;
}
if(checks < 25){
fee += (checks * 12);
}
else if(checks < 40){
fee += (checks * 15);
}
else if(checks < 60){
fee += (checks * 18);
}
else if(checks >= 60){
fee += (checks * 20);
}
printf("\nThis month's fee is:%d",fee);
}
else{
printf("\nAccount is overdrawn!");
}
else{
printf("\nNumber of checks can not be negative!");
}
return 0;
}

I found no question from you here. What there is looks like a copy/paste of the homework, some code and again no question found or statement from you what issue you think there is with the code as it is.

Take a moment to either ask a question or write what you think is wrong with the code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.