进的帮帮忙撒.嘿嘿.
/*下面这个结果是正确的*/ /*你什么编译器*/
#include "stdio.h"#include "conio.h"
#include<math.h>
int main()
{
float amount;
float zijin = 1000.0 ;
float lixi= 0.05 ;
int year ;
printf ("%4s%21s\n","Year", "Amount on deposit") ;
for (year=1; year<=10; year++){
amount = zijin * pow(1.0+lixi, year);
printf ("year=%d amount=%2.2f\n",year, amount );
}
getch();
}