04 2014 档案

摘要:Input年、月、日和时、分、秒Output年、月、日和时、分、秒Sample Input2013 12 2314 23 50Sample Output2013/12/2314:23:50#include using namespace std; class Time; class Date { public: Date(int y,int m,int d){year=y;month=m;day=d;}; friend void display(const Date &,const Time &); int year; int month; int day; }; class 阅读全文
posted @ 2014-04-10 21:28 浅水戏虾sty 阅读(5505) 评论(0) 推荐(0)
摘要:Description商店销售某一商品,每天公布统一的折扣(discount)。同时允许销售人员在销售时灵活掌握售价(price),在此基础上,一次购10件以上者,还可以享受9.8折优惠。现已知当天m个销货员销售情况为 销货员号(num) 销货件数(quantity) 销货单价(price) 101 5 23.5 102 12 24.56 103 100 21.5 请编写程序,计算出当日此商品的总销售款sum以及每件商品的平均售价。要求用静态数据成员和静态成员函数。(提示: 将折扣discount,总销售款... 阅读全文
posted @ 2014-04-07 15:09 浅水戏虾sty 阅读(11503) 评论(0) 推荐(1)
摘要:Input输入学号,并输入三个个科目成绩,三个科目名称分别用Chinese,Math,English来表示Output输出学号,并输出与学号对应的平均成绩,和挂科科目(全过输出一个pass)。每个输出项占一行,挂科科目每个也占一行。Sample Input1001 60 60 60Sample Outputstudent:100160passHINT使用int类型,不考虑小数。#include using namespace std; class S { public: void average(); void f(); void input() {cin>>num>> 阅读全文
posted @ 2014-04-04 17:46 浅水戏虾sty 阅读(760) 评论(0) 推荐(0)