各位大侠帮我看看这段程序哪里错了
#include<stdio.h>#include<windows.h>
int main()
{
float principal,rate,interest;
int days;
printf("enter loan principal (-1 to end):");
scanf("%f",&principal);
while(principal!=-1)
{printf("enter interest rate:");
scanf("%f",&rate);
printf("enter term of the loan in days:");
scanf("%f",&days);
interest=(float)principal*rate*days/365;
printf("the interest charge is:$%.2f\n",interest);
printf("enter loan principal (-1 to end):");
scanf("%f",&principal);}
system("pause");
return 0;}
不管输入什么数怎么输出都是31124214.00呀