I finished my program, but it has an error at the last three lines. I want to repair those errors so I can compile and test the program. If anyone can help me, I would appreciate it. my program is as follows:
Code:
#include <stdio.h>
void main ( )
{
int Month;
double Total = 0.0;
double total_interest = 0.0;
int Count=0;
int amount;
int withdrawal;
int total;
float interest;
printf("For how many months do you have savings account? \n");
scanf("%d", & Month);
while (Count++<Month)
{
printf("Enter the amount deposited for Month %d: ", Count);
scanf("%f", & amount);
total+=amount;
if ((amount%-1)==0);
printf("Amount should be subtracted from balance.");
printf("Enter amount withdrawn from savings account? \n");
scanf("%f", & amount);
if ((withdrawal +=amount)&& (total-=amount));
interest= total * 7.75 /12 ;
(total_interest += interest);
printf("The ending balance is %d , total");
printf("Total amount of deposits %d , total");
printf("Total amount of withdrawal %d, total");
}