#include <iostream>
using namespace std;
struct CandyBar
{
 char kind[20];
 float weight;
 int calory;
};

int main()
{
 CandyBar snack=
 {
  "Mocha Munch",
  2.3,
  350
 };
 cout<<"The kind of snack is: "<<snack.kind<<endl;
 cout<<"The weight of snack is: "<<snack.weight<<endl;
 cout<<"The calory of snack is: "<<snack.calory<<endl;
 system("pause");
 return 0;
}

编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第4章编程练习5的更多相关文章

  1. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习9

    #include <iostream> #include <fstream> #include <cstdlib> #include <string> ...

  2. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习8

    #include <iostream> #include <fstream> #include <cstdlib> const int SIZE=20; using ...

  3. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习7

    #include <iostream> #include <string> #include <cctype> using namespace std; int m ...

  4. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习6

    #include <iostream> #include <string> using namespace std; const int MSIZE=100; struct j ...

  5. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习5

    #include <iostream> using namespace std; const double N1=35000; const int N2=15000; const int ...

  6. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习4

    #include <iostream> using namespace std; const int strsize=30; const int BOPSIZE=5; void showm ...

  7. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习3

    #include <iostream> using namespace std; void showmenu(void) { cout<<"Please enter ...

  8. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习2

    #include <iostream> #include <cctype> using namespace std; const int MAXSIZE=10; int mai ...

  9. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习1

    #include <iostream>#include <cctype>using namespace std;int main(){ char ch; while((ch=c ...

  10. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习9

    #include <iostream>using namespace std;int main(){ int num; cout<<"Enter number of ...

随机推荐

  1. reactnative的js里的super的作用

    class Blink extends Component{ constructor(props){ super(props); this.state = { showText: true }; se ...

  2. STL容器之优先队列

    STL容器之优先队列 优先级队列,以前刷题的时候用的比较熟,现在竟然我只能记得它的关键字是priority_queue(太伤了).在一些定义了权重的地方这个数据结构是很有用的. 先回顾队列的定义:队列 ...

  3. Https双向认证Android客户端配置

    Https .cer证书转换为BKS证书 公式https://blog.csdn.net/zww986736788/article/details/81708967 keytool -importce ...

  4. 阿里 Goldeneye 四个环节落地智能监控:预测、检测、报警及定位

    阿里 Goldeneye 四个环节落地智能监控:预测.检测.报警及定位 https://www.infoq.cn/article/alibaba-goldeneye-four-links

  5. redis性能监控(一): Redis Info 命令 - 获取 Redis 服务器的各种信息和统计数值

    https://blog.csdn.net/wmx3ng/article/details/82772891 https://blog.csdn.net/lxpbs8851/article/detail ...

  6. yum安装Docker及入门使用

    一.安装 1.配置yum源 # vim /etc/yum.repos.d/docker.repo [dockerrepo] name=Docker Repository baseurl=https:/ ...

  7. 牛客网练习赛t2(线段树)

    题解: 好像因为他说了 数据范围全部在ll以内 所以直接暴力就可以过了 比较正常是用线段树来维护 洛谷上有道模板题是支持加,乘,区间和 而这题还多了区间平方和的操作 按照那题的操作 我们维护的时候保证 ...

  8. Ubuntu安装搜狗sougou输入法

    昨天ubuntu闪屏后进不去系统,之后重新安装的Ubuntu14.04,在软件中心安装了新立得软件包管理器 在网上下载搜狗输入法forlinux 网址:http://pinyin.sogou.com/ ...

  9. Hadoop Avro支持多输入AvroMultipleInputs

    Avro 提供了1.x版本的AvroMultipleInputs,但是不支持2.x API版本,因此修改对应代码,增加对hadoop 2.x API版本的的支持 代码放在https://github. ...

  10. 【原创】python 豆瓣采集

    新手今天刚学python~~~ 有点凌乱~勉强看吧 只能算是给新手看看,见谅 简单版本的 豆瓣采集美图~~~~~~ 美女天天有 有木有~~~ python 3.4 sqlite3 BeautifulS ...