package Exe;

import java.util.Scanner;

public class Day1 {

public static void main(String[] args) {

	Scanner in = new Scanner(System.in);
	int i;
	while (!((i = in.nextInt()) == 42)) {
		System.out.println(i);
	}
}

}

here is my code and it is running fine, but not working in the website

  • created

    Jul '19
  • last reply

    Jul '19
  • 1

    reply

  • 829

    views

  • 2

    users

In what way doesn’t it work? Does it compile? Does it run?

Before I could run the code on ideone, I had to remove the package definition, and make Day1 class not public.