online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
// Escriba la clase C1 para leer 3 enteros a, b y c e intercambiar sus valores de tal modo que // a <= b <= c y los muestra, repita el proceso si el usuario lo desea, ejemplo de salida: // Ingrese 3 enteros a, b, c: 3 2 1 // Valores intercabiados a, b, c: 1 2 3 // Continua s/n:s // Obligatorio: Usar unicamente if()s para intercalar valores. import java.util.Scanner; //class C1{ class Main{ static int a, b, c; static Scanner sc = new Scanner(System.in); public static void main(String[] args){ String s; do{ System.out.print("Ingrese 3 enteros a, b, c: "); a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); intercambiar(); System.out.printf("Valores intercabiados a, b, c: %d %d %d\n", a, b, c); System.out.print("Continua s/n:"); s = sc.next(); } while(s.equalsIgnoreCase("s")); } static void intercambiar(){ int t; if(a>b){t=a; a=b; b=t;} if(a>c){t=a; a=c; c=t;} if(b>c){t=b; b=c; c=t;} } }

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