摘要: #include <iostream> #include <vector> using namespace std; static int num = 0; struct Donation { string name ; double money = 0; }; int avg(int &a,int 阅读全文
posted @ 2023-12-14 20:01 wshidaboss 阅读(60) 评论(0) 推荐(0)
摘要: #include <iostream> #include <fstream> using namespace std; int main(){ fstream filename; int num = 0; char c; filename.open("test.txt", ios::in); whi 阅读全文
posted @ 2023-12-14 15:11 wshidaboss 阅读(38) 评论(0) 推荐(0)
摘要: 编写一个程序,记录捐助给“维护合法权利团体”的资金。该程序要求用户输入捐献者数目,然后要求用户输入每一个捐献者的姓名和款项。这些信息被储存在一个动态分配的结构数组中。每个结构有两个成员:用来储存姓名的字符数组(或 string 对象)和用来存储款项的 double 成员。读取所有的数据后程序将显示所 阅读全文
posted @ 2023-12-14 13:48 wshidaboss 阅读(58) 评论(0) 推荐(0)