[Java]
/*
* Start the program header annotation.
* Copyright and version Declaration of the program
* Copyright (c) 2011, a student from the computer College of Yantai University
* All rights reserved.
* File name: Input and Output Student Information
* Author: Xue Guangchen
* Completion date: January 1, September 14, 2011
* Version No.: x1.0
* Description of tasks and Solutions
* Input description:
* Problem description: six basic information items are known: Student ID, name, gender, age, height, and weight,
Enter the student information from the keyboard, and then output the student details.
* Program output:
* End the comment in the program Header
*/
/*
* @ Copyright: 2011 Shandong Strong software co, ltd.
* All right reserved.
* @ Author: zy
* @ Date: 2012-9-14
* @ Version: 1.0
*/
/*
* Comment: The function of completing a class in one sentence
* Description: describes the functions of a class in detail.
*/
Package xue.com;
Public class Exce02
{
/*
* @ Function:
* @ Param:
* @ Return:
* @ Exception
*/
Public static void main (String [] args)
{
System. out. println ("Enter the Student name ");
String stu_name = Console. readLine ();
System. out. println ("Enter the student ID ");
Int stu_number = Console. readInt ();
System. out. println ("Enter the Student gender ");
String stu_sex = Console. readLine ();
System. out. println ("Enter the student age ");
Int stu_age = Console. readInt ();
System. out. println ("Enter the student height ");
Double stu_height = Console. readDouble ();
System. out. println ("Enter the student weight ");
Double stu_weight = Console. readDouble ();
System. out. println ("basic student information :");
System. out. println ("student ID name gender age height weight ");
System. out. print (stu_name + "" + stu_number + "" + stu_sex + "" + stu_age + "" + stu_height + "" + stu_weight );
}
}
Running result
Enter Student name
Zhang San
Enter the student ID
10001
Enter the Student gender
Male
Enter the student age
20
Enter the student height
170
Enter student weight
130.5
Basic student information:
Student ID name gender age height weight
Zhang San 10001 male 20 170.0 130.5