Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class scalculator {
- public static void main(String args[]){
- Scanner sinput = new Scanner(System.in);
- double fnum, snum, answer;
- System.out.println("Enter first number: ");
- fnum = sinput.nextDouble();
- System.out.println("Enter second number: ");
- snum = sinput.nextDouble();
- answer = fnum + snum;
- System.out.println(answer);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement