online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> int UserInput(char* Operation, double* Num){ printf("\nInput Operation and Another Number: "); scanf(" %c", Operation); if ((scanf("%lf", Num)) != 1) { return 1; } return 0; } double Arithmetic(double X, double Y, char op){ switch (op){ case '+': return (X+Y); case '-': return (X-Y); case '/': return (X/Y); case '*': return (X*Y); } } int main(){ int i=0; int state; double Result[100], Num[100]; char Operation; printf("\nInput your Number: "); scanf("%lf", &Result[0]); while (1){ state = UserInput(&Operation, &Num[i]); if (state == 0 && Operation == '-'|| Operation =='+' || Operation =='/' || Operation =='*') { Result[i+1] = Arithmetic (Result[i], Num[i], Operation); printf ("\nResult: %.2lf\n", Result[i+1]); i++; }else { printf ("Invalid Operator or Number\n"); } } return 0; }

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