online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <math.h> double fak(int n) { int f = 1; int i = 0; do { i++; f *= i; } while(i<n); printf("fak(%d) = %d\n", n, f); return f; } double func_e() { double res = 0; double res_old = 0; double x, k; x = 1; k = 0; do { res_old = res; res += ((pow(x,k)) / fak(k)); k++; } while(res != res_old); return res; } int main(void) { //printf("power %f", pow(3,3)); printf("%f", func_e()); //printf("%f", fak(3)); printf("\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