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