This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//輸出cost | |
double getTypeACost(double I-nc, double E-nc, double lc, int I-n SMS, int E-n SMS); | |
double getTypeBCost(double I-nc, double E-nc, double lc, int I-n SMS, int E-n SMS); | |
double getTypeCCost(double I-nc, double E-nc, double lc, int I-n SMS, int E-n SMS); | |
double getTypeDCost(double I-nc, double E-nc, double lc, int I-n SMS, int E-n SMS); | |
double getTypeECost(double I-nc, double E-nc, double lc, int I-n SMS, int E-n SMS); | |
//輸出真正花費(cost低於資費時,還是得花資費的錢) | |
double getTypeARealCost(double I-nc, double E-nc, double lc, int I-n SMS, int E-n SMS); | |
double getTypeBRealCost(double I-nc, double E-nc, double lc, int I-n SMS, int E-n SMS); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int battle=0; | |
for(battle=1;battle<=5;battle++) | |
{ | |
battle(slime, 2); | |
switch(battle) | |
{ | |
case 1:printf("打完一場戰鬥還剩下4場\n");break; | |
case 2:printf("打完一場戰鬥還剩下3場\n");break; | |
case 3:printf("ㄚㄚ#\n");break; | |
case 4:printf("4\n");break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int battleTime=0,slime=2,cake; | |
for(;;) | |
{ | |
battle(slime); | |
battleTime++; | |
if(battleTime==1) | |
{ | |
printf("打完一場戰鬥,還剩下四場"); | |
} | |
else if(battleTime==2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int battleTime = 0; | |
for(;;){ | |
battle (slime*2); | |
battleTime=battleTime+1; | |
if (battleTime==1) | |
{ | |
printf("打玩一場戰鬥還剩下四場"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
printf("hello\n"); | |
printf("world\n"); | |
return 0; | |
} |