online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C++ Debugger. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Debug" button to debug it. *******************************************************************************/ #include <stdio.h> int main() { int a = 2 , b = 7; double result = 0; if( (a == 0 && b == 0 ) || (a == 0 && b > 0) ) { result = 0; } else if( (a > 0 && b == 0) || (a < 0 && b == 0) ) { result = 1; } else if(a != 0 && b != 0) { if(b > 0) { result = (double)a; for(int i = 2;i<=b;i++) { result = result * (double)a; } } else { result = (double)a; for (int i = b; i <= 0; i++) { result = result / (double)a; } } } printf("%f" , result); 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