#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的更多相关文章

  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. 让simplejson支持datetime类型的序列化

    simplejson是Python的一个json包,但是觉得有点不爽,就是不能序列化datetime,稍作修改就可以了: 原文:http://blog.csdn.net/hong201/article ...

  2. Django_Admin操作

    Django_Admin 创建Django_Admin 管理账户 D:\github\Django_Aadmin>python manage.py createsuperuser Usernam ...

  3. 【C++ Primer 第13章】2. 拷贝控制和资源管理

    拷贝控制和资源管理 • 类的行为像一个值.意味着它应该有自己的状态,当我们拷贝一个像值得对象时,副本和原对象是完全独立的,改变副本不会对原对象有任何影响. • 行为像指针的类则共享状态.当我们拷贝一个 ...

  4. IntelliJ IDEA 中自动生成 serialVersionUID 的方法

    as, idea plugin中搜如下关键字,并安装该插件: GenerateSerialVersionUID 如上图所示,创建一个类并实现Serializable接口,然后按alt+Enter键,即 ...

  5. fanuc 机床,加工中心通信总结,机床联网监控系统

    有需求要与fanuc机床及加工中心通讯,读取状态信息. 1.通过了解,与fanuc通讯需要具备的硬件条件如下: a.串口通讯:可以进行程序的上传下载,绝大部分机床状态也是以文件的形式保存,所以理论上都 ...

  6. docker下搭建zipkin for mysql

    docker pull openzipkin/zipkin 新建docker-compose.yml加入以下内容,自行修改. version: ' services: # The zipkin pro ...

  7. 爬虫2 urllib3 爬取30张百度图片

    import urllib3 import re # 下载百度首页页面的所有图片 # 1. 找到目标数据 # page_url = 'http://image.baidu.com/search/ind ...

  8. centos6.9安装mysql5.7.18

    详细记录在CentOS 6.9上安装MySQL 5.7.18 过程,希望对大家有所帮助. 下载地址:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysq ...

  9. Windows下MySQL数据目录修改

    最近在弄一个项目,需要修改windows下面的mysql的数据目录(mysql默认是存储在C盘的,这个不太好,未来一定会满了的). 我的 mysql 是安装版,版本是 5.7. 1.首先,需要知道my ...

  10. maven 构建spring boot + mysql 的基础项目

    一.maven 依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId> ...