跪求编程答案!!!就我!!!

2024-11-22 11:26:02
推荐回答(3个)
回答(1):

#include
#include
using namespace std;
char s[7][10]={"日","一","二","三","四","五","六"};
class DayTime
{
private:
int week;
int hour;
int minute;
int second;
public:
DayTime(int w=0,int h=0,int m=0,int s=1)
{
week=w;
hour=h;
minute=m;
second=s;
}

void showDayTime()
{
cout<<"星期"< cout< }
void ResetDayTime()
{
cout<<"请选择星期:(如周日:选0,以此类推)"< cin>>week;
cout<<"输入时间:(格式:XX XX XX)"< cin>>hour>>minute>>second;
}
};
int main()
{
DayTime s,t(5,13,24,50);
cout<<"默认时间:"< s.showDayTime();
cout<<"带参数:"< t.showDayTime();
cout<<"重设时间"<
s.ResetDayTime();
s.showDayTime();
return 0;
}

回答(2):

现在太晚了,我要明天有空的话帮你写

回答(3):

o(∩_∩)o...
用什么语言写呢?