第2章 第3题
来源:互联网 发布:golang select 编辑:程序博客网 时间:2024/04/29 23:07
#include <iostream>
using namespace std;
class Time
{
private:
int hour;
int minute;
int sec;
public:
void sl();
void sc();
};
void Time::sl()
{
cin>>hour;
cin>>minute;
cin>>sec;
};
void Time::sc()
{
cout<<hour<<":"<<minute<<":"<<sec<<endl;
};
int main()
{
Time t1;
cout<<"请按小时:分钟:秒输入\n";
t1.sl();
t1.sc();
using namespace std;
class Time
{
private:
int hour;
int minute;
int sec;
public:
void sl();
void sc();
};
void Time::sl()
{
cin>>hour;
cin>>minute;
cin>>sec;
};
void Time::sc()
{
cout<<hour<<":"<<minute<<":"<<sec<<endl;
};
int main()
{
Time t1;
cout<<"请按小时:分钟:秒输入\n";
t1.sl();
t1.sc();
return 0;
}
0 0
- 第2章第3题
- 第2章 第3题
- 第3章 第3题
- 第2章第2题
- 第2章 第2题
- 第3章 第4题
- 第3章 第5题
- 第3章 第7题
- 第3章 第8题
- 第3章 第9题
- 第3章 第10题
- 第3章 第11题
- 第3章 第12题
- 第4章 第3题
- 第5章 第3题
- 第5章第3题
- 第3章第37题
- 第7章第3题
- 不会是应该的么
- POJ 1573 & POJ 2632(两道有趣的Robot)实例
- StoryBoard+AutoLayout实战开发小技巧
- pg_restore数据库恢复指令
- 任正非接班人李一男离开华为时给属下的忠告
- 第2章 第3题
- aix无法创建2G以上大文件的问题
- java整型缓存
- Mysql命令行导入sql数据
- ubuntu12.04 安装配置jdk1.7
- AngularJS 数据双向绑定揭秘
- 不会是不是应该的
- Android中Cursor类的概念和用法
- SDUT 3185 Lexicography(排列问题(不会))