Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class scalculator {
  4.     public static void main(String args[]){
  5.         Scanner sinput = new Scanner(System.in);
  6.         double fnum, snum, answer;
  7.         System.out.println("Enter first number: ");
  8.         fnum = sinput.nextDouble();
  9.         System.out.println("Enter second number: ");
  10.         snum = sinput.nextDouble();
  11.         answer = fnum + snum;
  12.         System.out.println(answer);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement