25th May 2017, 12:12 PM
Karan
8 Respuestas
+ 5
@ Serena you maust add this code "Scanner sc = new Scanner(System.in);"
25th May 2017, 12:23 PM
Nithiwat
Nithiwat - avatar
+ 5
import java.util.Scanner; public class Sumoftwonumber { public static void main(String[] args) { int a,b,c; System.out.println("Enter two number"); Scanner sc = new Scanner(System.in); a = sc.nextInt(); b = sc.nextInt(); c = a+b; System.out.println("Sum = "+c); } }
25th May 2017, 12:23 PM
Nithiwat
Nithiwat - avatar
+ 1
Bro i have edited the code still not working plz help me
25th May 2017, 12:19 PM
Karan
+ 1
Oh I'm sorry ma'am thanks for the help i just added it to line 7 and it works thank u very very much.
25th May 2017, 12:25 PM
Karan
25th May 2017, 8:57 PM
Karan