Skip to content

Instantly share code, notes, and snippets.

@TranNgocMinh
Created February 4, 2018 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TranNgocMinh/c9acf35bf736c5140b7f1cd528518d4c to your computer and use it in GitHub Desktop.
Save TranNgocMinh/c9acf35bf736c5140b7f1cd528518d4c to your computer and use it in GitHub Desktop.
import java.util.Scanner;
...
public class ...{
public static void main(String[] args) {
Scanner scanner = new Scanner( System.in );
System.out.print( "Nhap so thu nhat: " );
int val1=Integer.parseInt( scanner.nextLine() );
System.out.print( "Nhap so thu hai: " );
int val2=Integer.parseInt( scanner.nextLine() );
int Total = val1+val2;
System.out.println("Tong la:" + Total);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment