I need help with a program. The problem I am having is getting the tax rate to be a percentage.
Code:
#include <stdio.h>
#define GALPERCUFT 7.4805
/* This program calculates the 15 year cost of a house */
/* 10/1/07 */
int main(void)
{
int ic, eb, ws, total, tr, eb15, ws15, tr15;
printf("\n What is the initial cost? ");
scanf("%d", &ic);
printf("\n How much is the electric bill? ");
scanf("%d", &eb);
printf("\n How much is the water and sewer bill? ");
scanf("%d", &ws);
printf("\n What is the tax rate? ");
scanf("%d", &tr);
eb15 = eb * 12 * 15;
ws15 = ws * 12 * 15;
tr15 = tr * ic * 15 * .01;
total = ic + eb15 + ws15 + tr15;
printf("\n Hurwitz ");
printf("\n Input data");
printf(" 15 year data");
printf("\n Initial Cost");
printf(" %d", ic);
printf(" %d", ic);
printf("\n Electric Bill");
printf(" %d", eb);
printf(" %d", eb15);
printf("\n Water and Sewer");
printf(" %d", ws);
printf(" %d", ws15);
printf("\n Tax Rate");
printf(" %d", tr);
printf("%");
printf(" %d", tr15);
printf("\n Total");
printf(" %d", total);
printf("\n\n");
return(0);
}