← Discussion

a+b in java

Akbar Asghari · 2017-02-04 23:00:22

import java.io.*; import java.util.Scanner; class add{ public static void main(String[] args){ System.out.println("a"); Scanner scan=new Scanner(System.in); int a=scan.nextInt(); System.out.println("b"); int b=scan.nextInt(); int c=a+b; System.out.print(c); } }

why erroe the project has been terminated with an exception.??????

pages:
  • 1