c++pp 7.13.8a
来源:互联网 发布:领淘宝优惠券的软件 编辑:程序博客网 时间:2024/05/01 02:04
#include<iostream>
using namespacestd;
#define Seasons 4
struct kaiZhi{
double feiYong[Seasons];
};
int* Fill(int *,int *, kaiZhi *);
void Show(int *,int *, kaiZhi *);
const char *Snames[Seasons] = {"Spring","Summer","Fall","Winter"};
int expen[Seasons];
int main(){
kaiZhi Sales;
int *size;
size = Fill(expen,expen+Seasons, &Sales);
cout <<"---------------------------------" <<endl;
Show(expen, size, &Sales);
system("PAUSE");
return0;
}
int* Fill(int *begin,int *end, kaiZhi *pa){
int *aSeason;
int j =0;
for (aSeason = begin; aSeason != end; aSeason++){
cout <<"Enter " << Snames[j] <<endl;
cin >> pa->feiYong[j];
j++;
}
return aSeason;
}
void Show(int *begin,int *end, kaiZhi *da){
double total =0;
int i =0;
int *aSeason;
for (aSeason = begin; aSeason != end; aSeason++){
cout <<Snames[i] << ": $" << da->feiYong[i] <<endl;
total += da->feiYong[i];
i++;
}
cout <<"Total Expenses: $" << total << endl;
}
- c++pp 7.13.8a
- c++pp 7.13.2
- c++pp 7.13.6
- c++pp 7.13.9
- C++PP 11-6
- C++PP 14-4
- pp
- PP
- pp
- pp
- 跑步( Running . pas / c / C pp )
- C++[pp]--课后练习与答案--2.6
- C++PP Chapter XVI String类和标准模板库
- 随意记录下 关于 指针 c char **pp;
- 看pp说pp
- without inq or pp how do you find out what LUN / array a scsi device is
- pp Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.
- GlobalPlatform TEE Protection Profile (PP)Version 1.2.1 A.3 攻击路径举例(一)
- 2017面试题收集
- spring boot 部署可执行jar包 时如何把webapp下面的文件打包到jar里面
- READING NOTE: Learning to Detect Human-Object Interactions
- java程序员的NodeJS初识篇
- shopnc v5完整代码
- c++pp 7.13.8a
- ThinkPHP利用phpqrcode生成二维码
- Codeforces Round #402 (Div. 2) C. Dishonest Sellers(贪心)
- java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils是什么问题
- Linux平台安装MongoDB
- const关键字
- 浅谈android的MVP设计模式之内存泄露问题
- JS如何判断空对象,及typeof和instanceof的区别
- Leetcode 9