Guest User

Untitled

a guest
May 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package test;
  6.  
  7. import java.text.NumberFormat;
  8. import java.util.Scanner;
  9.  
  10. /**
  11.  *
  12.  * @author koreden
  13.  */
  14. public class Test {
  15.  
  16.     /**
  17.      * @param args the command line arguments
  18.      */
  19.     public static void main(String[] args) {
  20.      
  21.    double db = 95.3;
  22.    double test = 98;
  23.    int j = 12, i = 15;
  24.    
  25.    double answer = (test+i+j)/3;
  26.    
  27.         NumberFormat nf = NumberFormat.getInstance();
  28.         System.out.println("The answer is " + nf.format(answer));
  29.       }
  30.     }
Add Comment
Please, Sign In to add comment