#include <iostream>
using namespace std;
const MAXSIZE=12;
const year=3;
int main()
{
 char *month[MAXSIZE]={"Janury","February","March","April","May","June","July","August","September","October","November","December"};
 int a[year][MAXSIZE];
 int sum[year]={0,0,0};
 int sumY=0;
 for(int i=0;i<year;i++)
 {
  cout<<"第"<<i+1<<"年的每个月的销量"<<endl;
  for(int j=0;j<MAXSIZE;j++)
  {
   cout<<month[j]<<": ";
   cin>>a[i][j];
   sum[i]+=a[i][j];
  }
  cout<<"第"<<i+1<<"年的总销量: "<<sum[i]<<endl;
  sumY+=sum[i];
 }
 cout<<"三年总销售量"<<sumY<<endl;
 system("pause");
 return 0;
}

编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习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. Docker:Docker 性质及版本选择 [三]

    一.Docker的性质 Docker的组成其实很简单.你需要搭建registry,专属于你自己的私有仓库,然后就是docker的镜像和docker的容器.Docker的镜像,就类似与windos的系统 ...

  2. Teamviewer远程ssh命令行更改密码启动

    Teamviewer远程ssh命令行更改密码启动 设置密码 $ sudo teamviewer passwd [NewPasswd ] 查看teamviewer信息 $ teamviewer info ...

  3. js值类型转换(boolean/String/number),js运算符,if条件,循环结构,函数,三种弹出框

    js值类型转换 number | string | boolean boolean类型转换 num = 0; var b1 = Boolean(num); console.log(b1) 转化为数字类 ...

  4. SqlServer 语法

    四.            Ranking 排序与排名是我们最为常用的统计方式,比如对班级的学生根据成员进行排名,或者按照成绩高低把学生划分成若干梯队:比如最好成绩的10名学生属于第一梯队,后10名又 ...

  5. Python面试题目之Python函数默认参数陷阱

    请看如下一段程序: def extend_list(v, li=[]): li.append(v) return li list1 = extend_list(10) list2 = extend_l ...

  6. HTTP协议08-请求首部字段

    请求首部字段 请求首部字段是从客户端往服务器端发送请求报文中所使用的字段,用于补充请求的附加信息.客户端信息,对响应内容相关的优先级等内容 1)Accept 通知服务器,用户代理能够处理的媒体类型及媒 ...

  7. Beta 冲刺(4/7)

    目录 摘要 团队部分 个人部分 摘要 队名:小白吃 组长博客:hjj 作业博客:beta冲刺(4/7) 团队部分 后敬甲(组长) 过去两天完成了哪些任务 整理博客 ppt模板 接下来的计划 做好机动. ...

  8. Laravel -- 邮箱功能配置问题

    ```` 今天碰到了这块的问题,还是记一下 ```` 关于邮箱: 品牌:腾讯qq.网易163 等 种类:个人.企业 邮箱服务器种类 配置教程 https://jingyan.baidu.com/art ...

  9. Vs2013 使用EF6 连接mysql数据库

    最近在使用MySQL数据库,在使用EF框架连接MySQL数据库时发现了一个问题,使用DB First创建实体对象的时候会出现如下图的错误:您的项目引用了最新版实体框架….. (如下图)或者会出现新建实 ...

  10. 【原创】大数据基础之Mesos+Marathon+Docker部署nginx

    一 安装 安装docker:https://www.cnblogs.com/barneywill/p/10343091.html安装mesos:https://www.cnblogs.com/barn ...