View Code of Problem 1

import java.util.Arrays;
import java.util.Scanner;
public class Hello {
	public static void main(String args[])
	{	
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		System.out.println(m+n);
	}
}

/*
Main.c:1:1: error: unknown type name 'import'
 import java.util.Arrays;
 ^
Main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
 import java.util.Arrays;
            ^
Main.c:2:1: error: unknown type name 'import'
 import java.util.Scanner;
 ^
Main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
 import java.util.Scanner;
            ^
Main.c:3:1: error: unknown type name 'public'
 public class Hello {
 ^
Main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Hello'
 public class Hello {
              ^
*/

Double click to view unformatted code.


Back to problem 1