今天我来写个小小的程序吧,大学生的作业,ATM程序系统,代码也就一点点,这个程序超级简单的哈,涉及到的也就C语言的 一点点知识点罢了,也没多少。下面我把代码发出来哈
#include
int choice;
int show_menu();
double get_money();
void deposit(double);
void withdraw(double);
double account = 0.0;
int main(int argc, const char *argv[])
{
system("COLOR 5f");
show_menu();
double temp;
while (choice != 0)
{
system("cls");
switch (choice)
{
case 1:
printf("您的当前余额为: %.2f\n", get_money());
break;
case 2:
printf("请输入您的存款金额:\n");
scanf("%lf", &temp);
deposit(temp);
printf("您的当前余额为: %.2f\n", get_money());
break;
case 3:
printf("您的当前余额为: %.2f\n", get_money());
p