回复 4楼 遮天云
是编一个关于农场的游戏,在游戏的开头要输入4个数据分别是:初始资金(double farm_coins),现在的等级(int level),朋友的数量(int friends),田的数量(int number_fields),这个程序的开始是这样的:
void
get_input(double*, int*, int*, int*);
double
work_on_farm(int, int*);
double
help_friends(int, int*);
void
display_round_statistics(int, double, int);
void
display_game_statistics(double, double, int, int, int);
int main()
{
double farm_coins, coins_earned_round = 0, coins_earned_game = 0;
int number_fields = 0;
int level = 0, round = 0;
int friends, friends_helped_round = 0, friends_helped_game = 0;
int choice;
char another;
/* print title and get player info */
printf("\nWelcome to IPC Farm Ville!\n\n");
get_input(&farm_coins, &level, &friends, &number_fields);