Java Small exercise (known students have school number, name, sex, age, height, weight six basic information, in turn, enter the student information from the keyboard, complete output of the health details. )

Source: Internet
Author: User
Tags readline
/* (Start of Program head Note) * Copyright and version Statement of the program (c) 2011, the Computer College of Yantai University * All rights reserved. * File Name: * Author: Shangpeng * Date of Completion: September 15, 2012 * Version number: 001 * for tasks

  

And the description of the solution method * Input Description: * Problem Description: Known students have number, name, sex, age, height, weight six basic information, in turn, input the student information from the keyboard, finished output of the health details. * Program Output: * Program Header comment End/public class Student {/** * @param args/public static void main (string[] args) {/
		*int num;
		char name;
		char sex;
		int age;
		Double height;
		Double weight;*/System.out.println ("Please enter Student's school number:");
        String str1= console.readline ();
        System.out.println (STR1);
		System.out.println ("Please enter the student's name:");
        String Str2=console.readline ();
        System.out.println (STR2);
		System.out.println ("Please enter the student's gender:");
       String Str3=console.readline ();
        System.out.println (STR3);
		System.out.println ("Please enter the student's Age:");
       String Str4=console.readline ();
        System.out.println (STR4);
		System.out.println ("Please enter the student's height:"); String str5=Console.ReadLine ();
        System.out.println (STR5);
		System.out.println ("Please enter the student's weight:");
       String Str6=console.readline ();
		 System.out.println (STR6);
		 System.out.println ("School Number name sex age height weight");
		 
        
	System.out.println (str1+ "+str2+" "+str3+" "+str4+" "+str5+" "+STR6");

 }

}

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.