Last active
June 7, 2018 11:12
-
-
Save rashedulemon/cb389ea34b088fca149927101ff31ac7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package input; | |
| import java.util.Scanner; | |
| public class Get_input { | |
| @SuppressWarnings("resource") | |
| public static void main(String[] args) { | |
| Scanner scr = new Scanner(System.in); | |
| System.out.println("Enter a number:"); | |
| int a = scr.nextInt(); | |
| System.out.println("Enter another number:"); | |
| int b = scr.nextInt(); | |
| int result = a + b; | |
| System.out.println("The result:"+ result); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment