here is my program and at the end I included the errors that my compiler showed.. please help me fix them. Thanks, john
-----------------------------------------------------
#include <stdio.h>
int main(void)
{
int balance, interest, min_payment_one, min_payment_two, balance_two, years, interest_multiplier, interest_addition;
float months_one, months_two, months_reduced;
/*Input for balance, interest and min_payment printing of lines 1-6*/
printf("Debt Analysis Program:\n"
printf("----------------------\n\n"
printf("Enter credit card's current balance: "
scanf("%d", &balance);
printf("\nEnter annual intrest rate (as decimal): "
scanf("%d", &interest);
printf("\nEnter minimum payment: "
scanf("%d", &min_payment_one);
/*Calculations for months_one*/
months_one = balance / min_payment_one;
years = months_one / 12;
years = ceil(years);
interest_multiplier = years * interest;
interest_addition = balance * interest_multiplier;
balance_two = interest_addition + balance;
months_one = balance_two / min_payment_one;
months_one = ceil(months_one);
/*printing of lines 7-12 and scanning of min_payment_two*/
printf("\n\nIt will take %f months to payoff this card with this minimum payment.\n\n", months_one);
printf("Try Increasing your payment by at lease $10...\n\n"
printf("New minimum payment: "
scanf("%d, &min_payment_two);
/*calculations for months_two and months_reduced*/
months_two = balance / min_payment_two;
years = months_two / 12;
years = ceil(years);
interest_multiplier = years * interest;
interest_addition = balance * interest_multiplier;
balance_two = interest_addition + balance;
months_two = balance_two / min_payment_two;
months_two = ceil(months_one);
months_reduced = months_one - months_two;
/*printing of lines 13-17*/
printf("\nNow it will take %f months to payoff this credit card.\n\n", months_two);
printf("You would reduce your load period by %f months with the new minimum payment.\n\n", months_reduced);
return 0;
}
--------------------------------------------------------
assign2.c:47:13: warning: multi-line string literals are deprecated
assign2.c: In function `main':
assign2.c:64: stray '\' in program
assign2.c:64: parse error before "nNow"
assign2.c:64: stray '\' in program
assign2.c:64: stray '\' in program
assign2.c:64:72: warning: multi-line string literals are deprecated
assign2.c:65: stray '\' in program
assign2.c:65: stray '\' in program
assign2.c:65:92: warning: multi-line string literals are deprecated
assign2.c:65:92: missing terminating " character
assign2.c:47:13: possible start of unterminated string literal
assign2.c:67:5: warning: no newline at end of file
-----------------------------------------------------
#include <stdio.h>
int main(void)
{
int balance, interest, min_payment_one, min_payment_two, balance_two, years, interest_multiplier, interest_addition;
float months_one, months_two, months_reduced;
/*Input for balance, interest and min_payment printing of lines 1-6*/
printf("Debt Analysis Program:\n"
printf("----------------------\n\n"
printf("Enter credit card's current balance: "
scanf("%d", &balance);
printf("\nEnter annual intrest rate (as decimal): "
scanf("%d", &interest);
printf("\nEnter minimum payment: "
scanf("%d", &min_payment_one);
/*Calculations for months_one*/
months_one = balance / min_payment_one;
years = months_one / 12;
years = ceil(years);
interest_multiplier = years * interest;
interest_addition = balance * interest_multiplier;
balance_two = interest_addition + balance;
months_one = balance_two / min_payment_one;
months_one = ceil(months_one);
/*printing of lines 7-12 and scanning of min_payment_two*/
printf("\n\nIt will take %f months to payoff this card with this minimum payment.\n\n", months_one);
printf("Try Increasing your payment by at lease $10...\n\n"
printf("New minimum payment: "
scanf("%d, &min_payment_two);
/*calculations for months_two and months_reduced*/
months_two = balance / min_payment_two;
years = months_two / 12;
years = ceil(years);
interest_multiplier = years * interest;
interest_addition = balance * interest_multiplier;
balance_two = interest_addition + balance;
months_two = balance_two / min_payment_two;
months_two = ceil(months_one);
months_reduced = months_one - months_two;
/*printing of lines 13-17*/
printf("\nNow it will take %f months to payoff this credit card.\n\n", months_two);
printf("You would reduce your load period by %f months with the new minimum payment.\n\n", months_reduced);
return 0;
}
--------------------------------------------------------
assign2.c:47:13: warning: multi-line string literals are deprecated
assign2.c: In function `main':
assign2.c:64: stray '\' in program
assign2.c:64: parse error before "nNow"
assign2.c:64: stray '\' in program
assign2.c:64: stray '\' in program
assign2.c:64:72: warning: multi-line string literals are deprecated
assign2.c:65: stray '\' in program
assign2.c:65: stray '\' in program
assign2.c:65:92: warning: multi-line string literals are deprecated
assign2.c:65:92: missing terminating " character
assign2.c:47:13: possible start of unterminated string literal
assign2.c:67:5: warning: no newline at end of file