online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import java.util.*; public class Main { public static void main (String[]args) { Scanner sc = new Scanner (System.in); int n = sc.nextInt (); int a = sc.nextInt (); int b = sc.nextInt (); int c = sc.nextInt (); int count = 0; int arr[] = { a, b, c }; Arrays.sort (arr); if (arr[0] >= n) { System.exit (0); } else { for (int i = 0; i < 2; i++) { if(n > 0) { n = n - arr[i]; count++; } } System.out.println(count); } } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue