I'm trying to prompt and print principal,rate,and days; and compute and display interest. The following doesn't seem to work. Any thoughts for correcting? The copile error I get on the last print is statement missing and after that I get a warning that "interest" is assigned a value that is never used. DW
#include<stdio.h>
void main(void)
{
int principal;
int rate;
int days;
int interest;
/* Prompt to enter principal*/
printf("\nEnter principal ");
scanf("%d",&principal);
/*Prompt to enter rate*/
printf("\nEnter rate ");
scanf("%d",&rate);
/* Prompt to enter days*/
printf("\nEnter days ");
scanf("%d",&days);
/*Print out the interest charge*/
interest=(principal*rate*days)/365
printf("\nThe interest charge is %f", principal*rate*days/365);
}