struct stu
{
int xh;
char xm[10];
float cj;
}x[61]={0,"",0};
int num;
void Inputnjxx(char nj[]) // 年级
{
time_t timer;
struct tm *tblock;
int year;
timer=time(NULL); // 获取机器的日期
tblock=localtime(&timer);
year=tblock->tm_year+1900;
if(tblock->tm_mon<8)
{
do
{
cout<<" 请输入年级("<<year-1<<"或";
cout<<year-2<<"或";
cout<<year-3<<"):";
cin>>nj;
if(atoi(nj)>year-1 || atoi(nj)<year-3)
cout<<" 年级越界!请重新输入!\n";
}while(atoi(nj)>year-1 || atoi(nj)<year-3 );