online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> void UserInput(char* Operation, double* Num){ char Op; double num; printf("\nInput Operation: "); scanf(" %c", Operation); printf("\nInput another Number: "); scanf("%lf", Num); // *Operation=Op; // *Num=num; } 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 NumChecker(int X){ // // if (X==1){ // // return (X); // // }else { // // printf("\nNot a Valid Number\n"); // // // int X = scanf("%lf", &Result[0]); // // } // } int main(){ int i=0; double Result[100], Num[100]; char Operation; while (1){ printf("Input your Number: "); int NumCheck = scanf("%lf", &Result[0]); if (NumCheck==1){ while (1){ UserInput(&Operation, &Num[i]); if (Operation == '-'||Operation =='+'||Operation =='/'||Operation =='*') { Result[i+1] = Arithmetic (Result[i], Num[i], Operation); }else {printf ("Invalid Operator\n"); } UserInput(&Operation, &Num[i]); } printf ("\nResult: %.2lf\n", Result[i+1]); i++; } else i=0; } 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