2016.03.29///java Study Record ③

Source: Internet
Author: User



package  height 5 feet 7 inches;  import java.util.scanner; public  class  Height 5 ft 7 inch  {     public static void main (String[]  args)  {         system.out.println ("The person is tall"  +    (( 5 + 7/ 12)  * 0.3048)   + "M");             system.out.println ("Height of the person"  +   ( 5 +  7.0/ 12)  * 0.3048)   + "M");         System.out.println ("Height of the person"  +   ( 5 + 7 / 12.0)  * 0.3048)   + "M");         system.out.println ("Height of the person"  +    (( 5 + 7.0/ 12.0)  * 0.3048)   + "M");     }  } 

The person is 1.524m tall.

The person is 1.7018m tall.

The person is 1.7018m tall.

The person is 1.7018m tall.


package  Height 5 ' 7 "; import java.util.scanner; public class  height 5 ' 7"  {      public static void main (String[] args)  {          system.out.println ("Height of the person"  +   ( 5 + 7/ 12)  * 0.3048)   + "M");         system.out.println (" The person is height " +  (float) (( 5 + 7/ 12)  * 0.3048)   +" M ");                system.out.println ("Height for this person"   +   (( 5 + 7.0/ 12)  * 0.3048)   + "M");         system.out.println ("Height of the person"  +   ( 5 + 7 / 12.0)  * 0.3048)   + "M");         system.out.println (" The person is of " + &nbsp" height.;(( 5 + 7.0/ 12.0)  * 0.3048)   + "M");     } } 

The person is 1.524m tall.

The person is 1.524m tall.

The person is 1.7018m tall.

The person is 1.7018m tall.

The person is 1.7018m tall.


Package Height 5 feet 7 inches; Import Java.util.Scanner; public class Height 5 ' 7 "{public static void main (string[] args) {System.out.println (" The person is Tall "+ ((5 + 7/12) * 0        .3048) + "M");        System.out.println ("Height of the person" + ((5 + (float) 7/12) * 0.3048) + "M"); }}

The person is 1.524m tall.

The person is 1.7018000484466553m tall.


Package Height 5 feet 7 inches; Import Java.util.Scanner; public class Height 5 ' 7 "{public static void main (string[] args) {System.out.println (" The person is Tall "+ ((5 + 7/12) * 0        .3048) + "M");            System.out.println ("Height of the person" + ((5 + (float) 7/12) * 0.3048) + "M");      System.out.println ("The person is Tall" + ((5 + (double) 7/12) * 0.3048) + "M"); }}

The person is 1.524m tall.

The person is 1.7018000484466553m tall.

The person is 1.7018m tall.

Package Height 5 feet 7 inches; Import Java.util.Scanner; public class Height 5 ' 7 "{public static void main (string[] args) {System.out.println (" The person is Tall "+ ((5 + 7/12) * 0        .3048) + "M");            System.out.println ("Height of the person" + ((5 + 7/(float) +) * 0.3048) + "M");      System.out.println ("Height of the person" + ((5 + 7/(double)) * 0.3048) + "M"); }}

The person is 1.524m tall.

The person is 1.7018000484466553m tall.

The person is 1.7018m tall.


Package Height 5 feet 7 inches; Import Java.util.Scanner; public class Height 5 ' 7 "{public static void main (string[] args) {System.out.println (" The person is Tall "+ ((5 + 7/12) * 0        .3048) + "M");            System.out.println ("Height of the person" + ((5 + (float) 7/(float) +) * 0.3048) + "M");      System.out.println ("The person is Tall" + ((5 + (double) 7/(double)) * 0.3048) + "M"); }}

The person is 1.524m tall.

The person is 1.7018000484466553m tall.

The person is 1.7018m tall.


Package Height 5 feet 7 inches; Import Java.util.Scanner; public class Height 5 ' 7 "{public static void main (string[] args) {System.out.println (" The person is Tall "+ ((5 + 7/12) * 0        .3048) + "M");            System.out.println ("Height of the person" + ((5 + (Double) 7/(float)) * 0.3048) + "M");      System.out.println ("The person is Tall" + ((5 + (float) 7/(double)) * 0.3048) + "M"); }}

The person is 1.524m tall.

The person is 1.7018m tall.

The person is 1.7018m tall.


This article from "Parasol Ya" blog, reproduced please contact the author!

2016.03.29///java Learning record ③

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.