《[工学]1223C实验报告》由会员分享,可在线阅读,更多相关《[工学]1223C实验报告(6页珍藏版)》请在金锄头文库上搜索。
1、using System;using System.Text;namespace ConsoleApplication14class casprivate string num;private string name;private string alx;private string money;private string min;private string sec;public string Namegetreturn name;setname = value;public string Numgetreturn num;setnum = value;public string Alxg
2、etreturn alx;setalx = value;public string Moneygetreturn money;setmoney = value;public void outmoney()double i;double sum;int min1, sec1;DateTime dt = new DateTime();dt = DateTime.Now;min1 = dt.Minute - Convert.ToInt32(min);sec1 = dt.Second - Convert.ToInt32(sec);for (int n = 0; n 1)Console.Write(输入
3、无效,输入您的选择);s=Console.ReadLine();if(s0=1)&(s0=5)switch (s0)case 1:personk.bulid();k+;if (k = 29)Console.WriteLine(超出预算的账户数目);break;case 2:string number;Console.WriteLine(输入要查询的账户账号);number = Console.ReadLine();bool key2 = false;for (int p = 0; p 30; p+)if (personp.Num != number)&(key=true)Console.Wri
4、teLine(输入查询的账号不存在);key=false;elseif (key2 = false)personp.inmoney();key = false;key2 = true;break;case 3:string number1;Console.WriteLine(输入要查询的账户账号);number1 = Console.ReadLine();bool key3 = false;for (int p = 0; p 30; p+)if (personp.Num != number1) & (key = true)Console.WriteLine(输入查询的账号不存在);key =
5、false;elseif (key3 = false)personp.outmoney();key = false;key3 = true;break;case 4:string number3;Console.WriteLine(输入要查询的账户账号);number3 = Console.ReadLine();bool key1 = false;for (int p = 0; p 30; p+)if (personp.Num != number3) & (key = true)Console.WriteLine(输入查询的账号不存在);key = false;elseif (key1 = false)personp.showmoney();key = false;key1 = true;break;case 5:break;elseConsole.WriteLine(没有此项选择,请重新选择);while(s0!=5);