Advertisement
JordanFarnell

Distance

Sep 13th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package distance;
  6.  
  7. /**
  8.  *
  9.  * @author FrogeL0rd1337
  10.  */
  11. public class Distance {
  12.  
  13.     /**
  14.      * @param args the command line arguments
  15.      */
  16.     public static void main(String[] args) {
  17.         double first = 12.2;
  18.         double second = 10.6;
  19.         double third = 5.8;
  20.         double total;
  21.        
  22.         total = first + second + third;
  23.         System.out.printf("The total distance ran was " + total + ".");
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement