Java technical support inputs and outputs Student Information

Source: Internet
Author: User

[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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.