1,函数的定义
#include "pch.h"
#include <iostream>
using namespace std;
int atm(int total, int check)
{
if(total-check<0)
{
cout<<"余额不够"<<endl;
return(total-check);
}
else
{
return(total-check);
}
}
int list()
{
cout<<"******************"<<endl;
cout<<"* score list *"<<endl;
cout<<"******************"<<endl;
return 0;
//这里也可以将return 0 去掉,将int list()改为void list()表示函数是不返回任何值的
2,函数的调用
银行卡取钱