#include <iostream>
using namespace std;
class point
{
private:
int h,m,s;
public:
void set_time();
void show_time();//成员函数
void jude_h();
void jude_m();
void jude_s();
};
void point::set_time()
{
cin>>h>>m>>s;//直接输入到内存里面去,是类的数据成员,无需重新定义
}
void point::jude_h()
{
if(h<0)
{
h=0;
}
else if(h>12)
{
h=12;
}
}
void point::jude_m()
{
if(m<0||m>60)
{
m=0;
}
}
void point::jude_s()
{
if(s<0||s>60)
{
s=0;
}
}
void point::show_time()
{
if(h<10)
{
using namespace std;
class point
{
private:
int h,m,s;
public:
void set_time();
void show_time();//成员函数
void jude_h();
void jude_m();
void jude_s();
};
void point::set_time()
{
cin>>h>>m>>s;//直接输入到内存里面去,是类的数据成员,无需重新定义
}
void point::jude_h()
{
if(h<0)
{
h=0;
}
else if(h>12)
{
h=12;
}
}
void point::jude_m()
{
if(m<0||m>60)
{
m=0;
}
}
void point::jude_s()
{
if(s<0||s>60)
{
s=0;
}
}
void point::show_time()
{
if(h<10)
{