herrDeng網內搜尋

自訂搜尋

Ads

2009年3月10日 星期二

作業4:複利計算

借錢500萬,年利18%,每月複利計算,請問連本帶利的金額
5, 10, 15, 20, 25, 30, 35, 40, 45, 50年的金額。並比較公式:

A*exp(0.18n)

A*(1+0.18/12)^(12*n), n=年數, A=本金

hint: math.h, pow, exp

66 則留言:

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{   
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f\t %f\n",i,B,C);
    }
    system("pause");
    return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
        B=A*pow(x,12.*i);
        C=A*exp(0.18*i);
        printf("%d-->%f\t %f\n",i, B, C);
    }
    system("Pause");
    return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
int A=5000000;
float B,C;
float x=1+0.18/12;
int i;
for (i=5;i<=50;i=i+5)
{
B=A*pow(x,12.*i);
C=A*exp(0.18*i);
printf("%d-->%f \t %f\n",i, B , C);
}

system("Pause");
return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
        B=A*pow(x,12.*i);
        C=A*exp(0.18*i);
        printf("%d-->%f\t %f\n",i, B, C);
    }
    system("Pause");
    return 0;
}
答案:
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for(i=5; i<=50; i=i+5)
    {
        B=A*pow(x,12.*i);
        C=A*exp(0.18*i);
        printf("%d-->%f\t %f\n",i, B, C);
    }
        system("Pause");
        return 0;   
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
    int A=5000000;
    float B, C ;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
          {
             B=A*pow(x,12.*i);
             C=A*exp(0.18*i);
             printf("%d-->%f\t %f\n",i, B,C);
          }
    system("pause");
    return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {
        B=A*pow(x,12.*i);
        C=A*exp(0.18*i);
        printf("%d-->%f\t %f\n",i,B,C);
     }
    system("pause");
    return 0;
}


5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
int A=5000000;
float B,C;
float x=1+0.18/12;
int i;
for(i=5;i<=50;i=i+5)
{
B=A*pow(x,12*i);
C=A*exp(0.18*i);
printf("%d-->%f\t %f\n",i,B,C);
}
system("pause");
return 0;
}





5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main () {
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
        B=A*pow(x,12.*i);
        C=A*exp(0.18*i);
        printf("%d-->%f \t %f\n",i,B,C);
    }             
    system("Pause");
    return 0;
}

5-->12216089.000000      12298016.000000
10-->29846564.000000     30248238.000000
15-->72921656.000000     74398656.000000
20-->178163472.000000    182991168.000000
25-->435292160.000000    450085664.000000
30-->1063513536.000000   1107032064.000000
35-->2598395136.000000   2722859520.000000
40-->6348444672.000000   6697154048.000000
45-->15510632448.000000          16472340480.000000
50-->37895852032.000000          40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{   
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f\t %f\n",i,B,C);
    }
    system("pause");
    return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
     int A=5000000;
     float B , C;
     float x=1+0.18/12;
     int i;
     for (i=5 ; i<=50 ; i=i+5)
     {
         B=A*pow (x,12.*i);
         C=A*exp (0.18*i);
         printf("%d-->%f;\t %f \n",i ,B ,C);
     }
     system("pause");
     return 0;
}


答案:37895852032 , 40515420160

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
    int a=5000000;
    float b, c ;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {
     b=a*pow(x,12.*i);
     c=a*exp(0.18*i);
     printf("%d-->%f\t %f\n",i,b,c);
    }
    system("pause");
    return 0;
}

答案:
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
     int A=5000000;
     float B,C ;
     float x=1+0.18/12;
     int i;
     for (i=5 ; i<=50 ; i=i+5)
     {
         B=A*pow (x,12.*i);
         C=A*exp (0.18*i);
         printf("%d-->%f;\t %f \n",i ,B ,C);
         }
         system("pause");
         return 0;
}
答案:37895852032 40515420160

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
    int A =5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50; i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i, B, C);
    }
    system("pause");
    return 0 ;
}


答案:5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i, B, C);
    }
    system("pause");
    return 0;
}

答案:
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
     int A=5000000;
     float B , C;
     float x=1+0.18/12;
     int i;
     for (i=5 ; i<=50 ; i=i+5)
     {
         B=A*pow (x,12.*i);
         C=A*exp (0.18*i);
         printf("%d-->%f;\t %f \n",i ,B ,C);
     }
     system("pause");
     return 0;
}


答案

5-->12216089.000000; 12298016.000000
10-->29846564.000000; 30248238.000000
15-->72921656.000000; 74398656.000000
20-->178163472.000000; 182991168.000000
25-->435292160.000000; 450085664.000000
30-->1063513536.000000; 1107032064.000000
35-->2598395136.000000; 2722859520.000000
40-->6348444672.000000; 6697154048.000000
45-->15510632448.000000; 16472340480.000000
50-->37895852032.000000; 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A =5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
                      B=A*pow(x,12.*i);
                      C=A*exp(0.18*i);
                      printf("%d-->%f \t %f\n",i, B, C);
    }
    system("pause");
    return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
    int A =5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
                     B=A*pow(x,12.*i);
                     C=A*exp(0.18*i);
                     printf("%d-->%f \t %f\n",i,B,C);
    }
    system("pause");
    return 0;
   
}



5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
     B=A*pow(x,12.*i);
     C=A*exp(0.3*i);
     printf("%d-->%f\t,%f\n",i,B,C);
     }
    system("pause");
    return 0;
     
}


ans:
5-->12216089.000000 ,22408446.000000
10-->29846564.000000 ,100427688.000000
15-->72921656.000000 ,450085664.000000
20-->178163472.000000 ,2017143936.000000
25-->435292160.000000 ,9040211968.000000
30-->1063513536.000000 ,40515420160.000000
35-->2598395136.000000 ,181577515008.000000
40-->6348444672.000000 ,813773946880.000000
45-->15510632448.000000 ,3647081807872.000000
50-->37895852032.000000 ,16345087344640.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,c;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
{
    B=A*pow(x,12.*i);
    c=A*exp(0.3*i);
    printf("%d-->%f\t %f\n",i,B,c);
}
    system("pause");
    return 0;
}

ANS:

5-->12216089.000000 22408446.000000
10-->29846564.000000 100427688.000000
15-->72921656.000000 450085664.000000
20-->178163472.000000 2017143936.000000
25-->435292160.000000 9040211968.000000
30-->1063513536.000000 40515420160.000000
35-->2598395136.000000 181577515008.000000
40-->6348444672.000000 813773946880.000000
45-->15510632448.000000 3647081807872.000000
50-->37895852032.000000 16345087344640.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1.+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f\t %f\n",i,B,C);
    }
    system("Pause");
    return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=500000;
    float B,C;
    float x=1.+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f\t %f\n",i,B,C);
    }
    system("Pause");
    return 0;
}





5-->1221608.875000 1229801.500000
10-->2984656.500000 3024823.750000
15-->7292165.500000 7439866.000000
20-->17816348.000000 18299118.000000
25-->43529216.000000 45008564.000000
30-->106351352.000000 110703208.000000
35-->259839504.000000 272285952.000000
40-->634844480.000000 669715392.000000
45-->1551063296.000000 1647234048.000000
50-->3789585152.000000 4051542016.000000

匿名 提到...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B,c;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
    B=A*pow(x,12.*i);
    c=A*exp(0.3*i);
    printf("%d-->%f\t %f\n",i,B,c);
}
    system("pause");                               
    return 0;
}

ANS:

5-->12216089.000000 22408446.000000
10-->29846564.000000 100427688.000000
15-->72921656.000000 450085664.000000
20-->178163472.000000 2017143936.000000
25-->435292160.000000 9040211968.000000
30-->1063513536.000000 40515420160.000000
35-->2598395136.000000 181577515008.000000
40-->6348444672.000000 813773946880.000000
45-->15510632448.000000 3647081807872.000000
50-->37895852032.000000 16345087344640.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int a=5000000;
    float b,c;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
    b=a*pow(x,12.*i);
    c=a*exp(0.18*i);
    printf("%d-->%f\t %f\n",i,b,c);
    }
    system("pause");
    return 0;
}


答案:
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
    int A=5000000;
    float B, c;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
    B=A*pow(x,12.*i);
    c=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i, B,c);
}
    system("Pause");
    return 0;
}

答案:
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
     int A=5000000;
     float B,C ;
     float x=1+0.18/12;
     int i;
     for (i=5 ; i<=50 ; i=i+5)
     {
         B=A*pow (x,12.*i);
         C=A*exp (0.18*i);
         printf("%d-->%f;\t %f \n",i ,B ,C);
         }
         system("pause");
         return 0;
}
答案:
5-->12216089.000000; 12298016.000000
10-->29846564.000000; 30248238.000000
15-->72921656.000000; 74398656.000000
20-->178163472.000000; 182991168.000000
25-->435292160.000000; 450085664.000000
30-->1063513536.000000; 1107032064.000000
35-->2598395136.000000; 2722859520.000000
40-->6348444672.000000; 6697154048.000000
45-->15510632448.000000; 16472340480.000000
50-->37895852032.000000; 40515420160.000000

匿名 提到...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, c;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
     B=A*pow(x,12.*i);
     c=A*exp(0.18*i);
     printf("%d-->%f \t %f\n",i, B,c);
    }
    system("Pause");
    return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
     B=A*pow(x,12.*i);
     C=A*exp(0.18*i);
     printf("%d-->%f \t %f \n",i,B,C);
    }
     system("pause");
     return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
    int  A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;   
    for (i=5;i<=50;i=i+5)
    {
        B=A*pow(x,12.*i);
        C=A*exp(0.18*i);
        printf("%d-->%f \t %f\n",i,B,C);
    }
    system("pause");
    return 0;
}
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for(i=5; i<=50; i=i+5)
    {
      B=A*pow(x,12.*i);
      C=A*exp(0.18*i);
      printf("%d-->%f\t%f\n",i,B,C);
    }
    system("Pause");
    return 0;
}


Ans:
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
      B=A*pow(x,12.*i);
      C=A*exp(0.18*i);
      printf("%d-->%f \t %f\n",i,B,C);
    }
    system("pause");
    return 0;
}




5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B ,C ;
    float x=1.+0.18/12;
    int i;
    for(i=5 ;i<=50 ;i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f\t %f\n",i ,B ,C);
    }       
    system("Pause");
    return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
     B=A*pow(x,12.*i);
     C=A*exp(0.18*i);
     printf("%d\n-->%f \t %f\n",i,B,C);
    }
    system ("pause");
    return 0;
}

5
-->12216089.000000       12298016.000000
10
-->29846564.000000       30248238.000000
15
-->72921656.000000       74398656.000000
20
-->178163472.000000      182991168.000000
25
-->435292160.000000      450085664.000000
30
-->1063513536.000000     1107032064.000000
35
-->2598395136.000000     2722859520.000000
40
-->6348444672.000000     6697154048.000000
45
-->15510632448.000000    16472340480.000000
50
-->37895852032.000000    40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {
     B=A*pow(x,12.*i);
     C=A*exp(0.18*i);
     printf("%d\n-->%f \t %f\n",i, B, C);
     }
system("pause");
return 0;
}

5
-->12216089.000000 12298016.000000
10
-->29846564.000000 30248238.000000
15
-->72921656.000000 74398656.000000
20
-->178163472.000000 182991168.000000
25
-->435292160.000000 450085664.000000
30
-->1063513536.000000 1107032064.000000
35
-->2598395136.000000 2722859520.000000
40
-->6348444672.000000 6697154048.000000
45
-->15510632448.000000 16472340480.000000
50
-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float  B,C;
    float x=1+0.18/12;
    int  i;
    for  (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float  B,C;
    float x=1+0.18/12;
    int  i;
    for  (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1.+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f\t %f\n",i,B,C);
    }
    system("Pause");
    return 0;
}

5-->12216089.000000      12298016.000000
10-->29846564.000000     30248238.000000
15-->72921656.000000     74398656.000000
20-->178163472.000000    182991168.000000
25-->435292160.000000    450085664.000000
30-->1063513536.000000   1107032064.000000
35-->2598395136.000000   2722859520.000000
40-->6348444672.000000   6697154048.000000
45-->15510632448.000000  16472340480.000000
50-->37895852032.000000  40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
int A=5000000;
float B,C;
float x=1+0.18/12;
int i;
for(i=5; i<=50; i=i+5)
{
B=A*pow(x,12.*i);
C=A*exp(0.18*i);
printf("%d-->%f\t %f \n",i,B,C);
}
system("Pause");
return 0;
}
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {
     B=A*pow(x,12.*i);
     C=A*exp(0.18*i);
     printf("%d->%f \t %f \n",i,B,C);
    }
    system ("pause");
    return 0;
}

匿名 提到...

int A=5000000;
    float B, C;
    float X=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t \n",i,B,C);
    }system("pause");
    return 0;

匿名 提到...

include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
     B=A*pow(x,12.*i);
     C=A*exp(0.18*i);
     printf("%d-->%f\t %f \n",i,B,C);
    }
    system("pause");
    return 0;
}
5-->12216089.000000      12298016.000000
10-->29846564.000000     30248238.000000
15-->72921656.000000     74398656.000000
20-->178163472.000000    182991168.000000
25-->435292160.000000    450085664.000000
30-->1063513536.000000   1107032064.000000
35-->2598395136.000000   2722859520.000000
40-->6348444672.000000   6697154048.000000
45-->15510632448.000000  16472340480.000000
50-->37895852032.000000  40515420160.000000

 

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main ()
{
int A=5000000;
float B, C;
float x=1+0;18/12;
int i;
for (i=5;i<=50;i=i+5)
{
B=A*pow(x,12*1);
C=A*exp (0.18*i);
printf("%d-->%f \t %f\n",i,B,C);
}
system("pause");
return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
    int  A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;   
    for (i=5;i<=50;i=i+5)
    {
        B=A*pow(x,12.*i);
        C=A*exp(0.18*i);
        printf("%d-->%f \t %f\n",i,B,C);
    }
    system("pause");
    return 0;
}
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=500000;
    float B;
    float X=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
   {
    B=A*pow(X,12.*i);
    printf("%f\n",B);
   }
    system("pause");
    return 0 ;
}









#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=500000;
    float B,C;
    float X=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
   {
    B=A*pow(X,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
   }
    system("pause");
    return 0 ;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
     int A=500000;
     float B,C;
     float X=1+0.18/12;
     int i;
     for(i=5;i<=50;i=i+5)
     {
      B=A*pow(X,12.*i );
      C=A*exp(0.18*i);                  
      printf("%d-->%f\t %f\n",i,B,C);
   
      }
      system("pause");
      return 0;
}





#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
     int A=500000;
     float B,C;
     float X=1+0.18/12;
     int i;
     for(i=5;i<=50;i=i+5)
     {
      B=A*pow(X,12.*i );
      C=A*exp(0.18*i);                  
      printf("%d-->%f\t %f\n",i,B,C);
   
      }
      system("pause");
      return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
    B=A*pow(x,12.*1);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i, B, C);
    }
    system("pause");
    return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for(i=5;i<=50;i=i+5)
    {
     B=A*pow(x,12.*i);
     C=A*exp(0.18*i);
     printf("%d-->%f \t %f \n",i,B,C);     
    }
    system("pause");
    return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
int A=5000000;
float B,C;
float x=1+0.18/12;
int i;
for(i=5; i<=50; i=i+5)
{
B=A*pow(x,12.*i);
C=A*exp(0.18*i);
printf("%d-->%f\t %f \n",i,B,C);
}
system("Pause");
return 0;
}
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}




#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}

匿名 提到...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}




#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
          int i;
          for(i=5;i<=50;i=i+5)
{
          B=A*pow(x,12.*i);
          C=A*exp(0.18*i);
          printf("%d-->%f\t%f\n",i,B,C);
}
      system("Pause");
      return 0;
}



5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}




#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
    int A=500000;
    float b, c ;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
          {
             b=A*pow(x,12.*i);
             c=A*exp
答案
5-->1221608.875000 1229801.500000
10-->2984656.500000 3024823.750000
15-->7292165.500000 7439866.000000
20-->17816348.000000 18299118.000000
25-->43529216.000000 45008564.000000
30-->106351352.000000 110703208.000000
35-->259839504.000000 272285952.000000
40-->634844480.000000 669715392.000000
45-->1551063296.000000 1647234048.000000
50-->3789585152.000000 4051542016.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}




#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f \t %f\n",i,B,C);
    }system("pause");
    return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main (){
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
          {
             B=A*pow(x,12.*i);
             C=A*exp(0.18*i);
             printf("%d-->%f \t %f\n",i, B, C);
          }
    system("pause");
    return 0;
}                       

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
    int A=5000000;
    float B, C ;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
           {
                    B=A*pow(x,12.*i);
                    C=A*exp(0.18*i);
                    printf("%d-->%f \t %f\n",i, B, C);
           }
        system("pause");
        return 0;
}

答案
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int A=5000000;
float B, C;
float x=1+0.18/12;
int i;
for(i=5; i<=50; i=i+5)
{
B=A*pow(x,12.*i);
C=A*exp(0.18*i);
printf("%d-->%f \t %f\n", i, B, C);
}

system("pause");
return 0;
}
5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int A=5000000;
float B, C;
float x=1+0.18/12;
int i;
for(i=5;i<=50;i=i+5)
{
B=A*pow(x,12.*i);
C=A*exp(0.18*i);
printf("%d\n-->%f \t %f\n",i, B, C);
}
system("pause");
return 0;
}

5
-->12216089.000000 12298016.000000
10
-->29846564.000000 30248238.000000
15
-->72921656.000000 74398656.000000
20
-->178163472.000000 182991168.000000
25
-->435292160.000000 450085664.000000
30
-->1063513536.000000 1107032064.000000
35
-->2598395136.000000 2722859520.000000
40
-->6348444672.000000 6697154048.000000
45
-->15510632448.000000 16472340480.000000
50
-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
          int i;
          for(i=5;i<=50;i=i+5)
{
          B=A*pow(x,12.*i);
          C=A*exp(0.18*i);
          printf("%d-->%f\t%f\n",i,B,C);
}
      system("Pause");
      return 0;
}
5-->12216089.000000     12298016.000000
10-->29846564.000000    30248238.000000
15-->72921656.000000    74398656.000000
20-->178163472.000000   182991168.000000
25-->435292160.000000   450085664.000000
30-->1063513536.000000  1107032064.000000
35-->2598395136.000000  2722859520.000000
40-->6348444672.000000  6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
          int i;
          for(i=5;i<=50;i=i+5)
{
          B=A*pow(x,12.*i);
          C=A*exp(0.18*i);
          printf("%d-->%f\t%f\n",i,B,C);
}
      system("Pause");
      return 0;
}
5-->12216089.000000     12298016.000000
10-->29846564.000000    30248238.000000
15-->72921656.000000    74398656.000000
20-->178163472.000000   182991168.000000
25-->435292160.000000   450085664.000000
30-->1063513536.000000  1107032064.000000
35-->2598395136.000000  2722859520.000000
40-->6348444672.000000  6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B, C;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
    {
     B=A*pow(x,12.*i);
     C=A*exp(0.18*i);
     printf("%d\n-->%f \t %f\n",i, B, C);
     }
system("pause");
return 0;
}

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
          int i;
          for(i=5;i<=50;i=i+5)
{
          B=A*pow(x,12.*i);
          C=A*exp(0.18*i);
          printf("%d-->%f\t%f\n",i,B,C);
}
      system("Pause");
      return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000
請按任意鍵繼續 . . .

匿名 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
    int A=5000000;
    float B, C ;
    float x=1+0.18/12;
    int i;
    for (i=5;i<=50;i=i+5)
          {
             B=A*pow(x,12.*i);
             C=A*exp(0.18*i);
             printf("%d-->%f\t %f\n",i, B,C);
          }
    system("pause");
    return 0;
}

5-->12216089.000000 12298016.000000
10-->29846564.000000 30248238.000000
15-->72921656.000000 74398656.000000
20-->178163472.000000 182991168.000000
25-->435292160.000000 450085664.000000
30-->1063513536.000000 1107032064.000000
35-->2598395136.000000 2722859520.000000
40-->6348444672.000000 6697154048.000000
45-->15510632448.000000 16472340480.000000
50-->37895852032.000000 40515420160.000000

匿名 提到...

<P>#include &lt;stdio.h&gt;</P>
<P>#include &lt;stdlib.h&gt;</P>
<P>#include &lt;math.h&gt;</P>
<P>int main()</P>
<P>{</P>
<P>int A=5000000;</P>
<P>float B,C;</P>
<P>float x=+0.18/12;</P>
<P>int i;</P>
<P>for(i=5;i&lt;=50;i=i+5)</P>
<P>{</P>
<P>B=A*pow(x,12.*i);</P>
<P>C=A*exp(0.18*i);</P>
<P>printf("%d--&gt;%f\t,%f\n",i,B,C);</P>
<P>}</P>
<P>system("pause");</P>
<P>return 0;</P>
<P>}</P>

答:
5-->12216089.000000 ,12298016.000000
10-->29846564.000000 ,30248238.000000
15-->72921656.000000 ,74398656.000000
20-->178163472.000000 ,182991168.000000
25-->435292160.000000 ,450085664.000000
30-->1063513536.000000 ,1107032064.000000
35-->2598395136.000000 ,2722859520.000000
40-->6348444672.000000 ,6697154048.000000
45-->15510632448.000000 ,16472340480.000000
50-->37895852032.000000 ,40515420160.000000
請按任意鍵繼續 . . .

b9733162 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{   
    int A=5000000;
    float B,C;
    float x=1+0.18/12;
    int i;
    for (i=5; i<=50; i=i+5)
    {
    B=A*pow(x,12.*i);
    C=A*exp(0.18*i);
    printf("%d-->%f\t %f\n",i,B,C);
    }
    system("pause");
    return 0;
}

b9733172 提到...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int A=5000000;
float B,C;
float x=1+0.18/12;
int i;
for (i=5; i<=50; i=i+5)
{
B=A*pow(x,12.*i);
C=A*exp(0.18*i);
printf("%d-->%f\t %f\n",i,B,C);
}
system("pause");
return 0;
}

Related Posts Plugin for WordPress, Blogger...

熱門文章