编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第4章编程练习5
#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的更多相关文章
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习9
#include <iostream> #include <fstream> #include <cstdlib> #include <string> ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习8
#include <iostream> #include <fstream> #include <cstdlib> const int SIZE=20; using ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习7
#include <iostream> #include <string> #include <cctype> using namespace std; int m ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习6
#include <iostream> #include <string> using namespace std; const int MSIZE=100; struct j ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习5
#include <iostream> using namespace std; const double N1=35000; const int N2=15000; const int ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习4
#include <iostream> using namespace std; const int strsize=30; const int BOPSIZE=5; void showm ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习3
#include <iostream> using namespace std; void showmenu(void) { cout<<"Please enter ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习2
#include <iostream> #include <cctype> using namespace std; const int MAXSIZE=10; int mai ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习1
#include <iostream>#include <cctype>using namespace std;int main(){ char ch; while((ch=c ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习9
#include <iostream>using namespace std;int main(){ int num; cout<<"Enter number of ...
随机推荐
- Linux进程管理工具
Linux进程管理工具 Htop yum install htop 参考帮助: http://blog.csdn.net/skh2015java/article/details/53173896 Li ...
- Hadoop java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
.jar 学习好友推荐案例的时候,提交运行时报错找不到StringUtils java.lang.ClassNotFoundException: org.apache.commons.lang3.St ...
- 安装CentOS 7(转)
转载地址:https://www.cnblogs.com/wcwen1990/p/7630545.html CentOS7安装详解 本文基于vmware workstations进行CentOS7 ...
- 【AtCoder】ARC074
ARC 074 C - Chocolate Bar 直接枚举第一刀横切竖切,然后另一块要求如果横切分成\(H / 2\)竖切分成\(W/2\)即可 #include <bits/stdc++.h ...
- 【Android】Android自定义属性,attr format取值类型
1. reference:参考某一资源ID. (1)属性定义: <declare-styleable name = "名称"> <attr name = &quo ...
- 【Android】Android 手机忘记锁屏密码的解决办法
对于忘记Android锁屏密码的筒子们,除重新刷包或者wipe data外,还可用adb来删除密码: 方法很简单 1.手机连接电脑,不要打开数据连接,在充电模式下进行. 2.在电脑上,解压adb.zi ...
- Python_configparser模块
configparser : 用于处理ini结构相似的文件,格式类似于: [DEFAULT] # 相当于一个分组 # option # 注释,说明性文字 ,默认以# 或‘:’开头的行 option1 ...
- 卸载impala
1):删除impala rm -rf $(find / -name "*impala*") 2):卸载impala相关依赖 rm -rf $(find / -name " ...
- autio的自动播放问题
最近做年会相关内容,背景音乐插入了,电脑上没问题,移动版就出事了,下面做一下记录 <audio src="" autoplay="autoplay" l ...
- Python学习(十七)—— 数据库(二)
转载自http://www.cnblogs.com/linhaifeng/articles/7356064.html 一. 数据库管理软件的由来 基于我们之前所学,数据要想永久保存,都是保存于文件中, ...