-->
当前位置:首页 > 题库

PROGRAMMING:Class definition and object usage

Luz5年前 (2021-05-10)题库383
Please define a student class, including student number, name and age (7-60 years old). After inputting the student's member value from the keyboard, the object is generated, and the corresponding result is output as required.
###Input format:
The first line is an integer k, which represents the number of students to be generated later.
A continuous K-line starting from the second line, with 3 data in each line, respectively representing the student number, name and age of a student.
###Output format:
Output the basic information of each student. If the data does not meet the requirements, output "bad"
###Input example:
```in
three
20174042001 zhangsan 20
20174042030 lisi 2
20174042050 wangwu 17
```
###Output example:
```out
zhangsan 20174042001 20
bad
wangwu 20174042050 17
```







answer:If there is no answer, please comment