Exercise 4.9
来源:互联网 发布:网络大电影融资 编辑:程序博客网 时间:2024/04/29 22:46
#include<iostream>using namespace std;struct CandyBar{ char pinpai[20]; float weight; int ka;};int main(){ int n; cout << "请输入糖果种数:"; (cin >> n).get(); CandyBar *snack = new CandyBar [n]; for(int i = 0;i < n;i++) { cout << "请输入糖果的品牌:"; cin.getline(snack[i].pinpai,20); cout << "请输入该品牌糖果的重量:"; cin >> snack[i].weight; cout << "请输入该品牌糖果的热量:"; cin >> snack[i].ka; cin.get(); } for(int i = 0;i < 3;i++){ cout << snack[i].pinpai << endl; cout << snack[i].weight << endl; cout << snack[i].ka << endl << endl; } return 0;}
- Exercise 4.9
- SICP Exercise 4.9
- Exercise
- exercise
- Exercise
- exercise
- Exercise 4.2 Exercise 4.3
- Exercise------------ProgUseJava
- Exercise 1.16
- exercise 1.17
- exercise 1.19
- exercise CombinationNoNeighboring
- exercise permutation
- Exercise: WindowsAzureRoleCommunicationVS2010Lab
- python exercise
- btrace exercise
- Code Exercise
- Exercise 4
- hdu-1086You can Solve a Geometry Problem too
- 板子telnet失败
- AT&T汇编
- 结构体(含位域)的sizeof 对齐相关
- 控制线程
- Exercise 4.9
- 黑莓-一 一个王朝的的兴衰之路。
- ubuntu 下的硬盘 io 情况
- 大数据可视化工具---GraphBuilder demo
- linux把文件压缩的各种命令
- sharepoint 2010 如何创建文档库内容类型content type
- 从内存上解析c++中数组为什么不支持多态
- linux上安装svn 提示svn: Unrecognized URL scheme错误
- C#广播程序