编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第4章编程练习7
#include <iostream>
using namespace std;
struct Pizza
{
char company[50];
float diameter;
float weight;
};
int main()
{
Pizza piz;
cout<<"Enter the company name: ";
cin.getline(piz.company,50);
cout<<"The name of pizza company is: "<<piz.company<<endl;
cout<<"Enter the diameter of the pizza: ";
cin>>piz.diameter;
cout<<"The diameter of its pizza is: "<<piz.diameter<<endl;
cout<<"Enter the weight of pizza is: ";
cin>>piz.weight;
cout<<"The weight of its pizza is: "<<piz.weight<<endl;
system("pause");
return 0;
}
编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第4章编程练习7的更多相关文章
- 编程菜鸟的日记-初学尝试编程-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 ...
随机推荐
- HDU 3294 Girls' research(manachar模板题)
Girls' researchTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total ...
- Mom and Dad
Mom Poodwaddle Life clock Dad Poodwaddlw Life clock Happiness is the meaning and the purpose of lif ...
- @ResponseBody 和 @RequestBody 的作用
先提一嘴 @RequestMapping(“url”),这里的 url写的是请求路径的一部分,一般作用在 Controller的方法上,作为请求的映射地址. 代码: @RequestMapping(v ...
- Git的常见基础操作命令
Git的常见基础操作命令 1安装初始化 1.1安装git本地安装Windows版本 下载地址: https://git-scm.com/downloads/ 1.2初始化Git用户信息配置 配置git ...
- C#通讯录——Windows Form Contact List
C#通讯录 Windows Form Contact List 主窗口 using System; using System.Collections.Generic; using System.Com ...
- Nodejs通过账号密码连接MongoDB数据库
转自https://blog.csdn.net/szu_lzz/article/details/77435804#commentBox 1.创建管理员 首先开启Mongo服务,然后切换admin数据库 ...
- 「BZOJ3791」作业
题解: 比正解的做法要复杂 正解直接确定了最多有2k-1段 并且可以证明2k-1是一定可以覆盖的 于是可以直接dp 我的想法是先覆盖一段黑的,然后白的覆盖上去 所以f[i][0/1/2][0/1/2] ...
- BZOJ4675
题解: 考虑这么一件事情,n个人买彩票,在不断抽走卡片的时候,他们的中奖概率是不变的 所以在这道题中,由于每个人的操作次数是确定的,所以选每k个点的概率是相同的(因为如果我们逐一考虑每一次操作这个问题 ...
- 51nod1967 路径定向 Fleury
题目传送门 题解 几乎是Fleury模板题. 一开始我们把图看作无向图,然后对于度为奇数的点增边,使得整个图的所有点都是偶数的. 然后跑一遍欧拉回路 Fleury ,所有的边就定向好了~ 代码 #in ...
- yield与yield from
yield 通过yield返回的是一个生成器,yield既可以产出值又可以生成值,yield可以用next()来启动生成器,同时可以用send向生成器传递值:在初次启动生成器时,需调用next()或s ...