online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import java.util.Arrays; public class Main { public static void main(String[] args){ int[] arr = {12, 10, 52, 57, 14, 91, 34, 100, 245, 78, 91, 32, 354, 80, 13, 67, 65}; System.out.println(Arrays.toString(arr)); solve(arr); System.out.println(Arrays.toString(arr)); } private static void solve(int[] arr){ for(int i=arr.length-1,ptr = i;i>=0;--i){ if((arr[i] & 1) == 1){ swap(arr,i,ptr--); } } } private static void swap(int[] arr,int x,int y){ int temp = arr[x]; arr[x] = arr[y]; arr[y] = temp; } }

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