一道简单的C++编程题 (1)把输入的时间数字变成时间,小时分钟秒,比如说输入(3,58,40)输出3:58:40

[复制链接]
查看11 | 回复3 | 2011-3-10 16:15:15 | 显示全部楼层 |阅读模式
很简单,用string.h库里面的strstr函数即可完成任务。...
回复

使用道具 举报

千问 | 2011-3-10 16:15:15 | 显示全部楼层
#include #include using namespace std;void main(){inthour;intminite;intsecond;cout>hour>>minite>>second;sy...
回复

使用道具 举报

千问 | 2011-3-10 16:15:15 | 显示全部楼层
基本成功了,你还可以在输出函数showtime中修饰一下输入3 58 40 输出3:58:40#includeusing namespace std;class time{public:
void Settime(int a,int b,int c) {hour=a;
month=b;...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行