liangm20

Unit 2 Activity 1 Code

Sep 8th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. /**
  2. * A program that will convert inches to centimeters. You can change the number for the inches; I used 9.15 as an example.
  3. *
  4. * @Michelle
  5. * @9/08/16
  6. */
  7. public class inchcentimeter
  8. {
  9. public static void main (String[] args)
  10. {
  11. double inch = 9.15;
  12. double centimeter = inch * 2.54;
  13. System.out.print(inch + " inches " + "is equal to " + centimeter + " centimeters.");
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment