online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> #define N 5 #define M 5 void multiply (int *in1, int *in2) { int cr; int tmp[N + 5]; for (int i = 0; i <= in2[0]; i++) tmp[i] = in2[i]; in2[0] = 0; for (int i = 1; i <= in1[0]; i++) for (int j = 1; j <= tmp[0]; j++) { cr = in1[i] * tmp[j]; for (int k = i + j - 1; cr > 0; k++) { if (k > in2[0]) in2[0] = k; else cr += in2[k]; in2[k] = cr % 10; cr /= 10; } } } void writelong (int *y) { for (int i = y[0]; i > 0; i--) printf ("%d", y[i]); } int main (void) { int n; int y[N * M]; int out[N * M]; /* int a[N]; */ int a[] = { 2, 5, 1 }; /* First number 15 */ n = M; /* Degree of number 5 */ for (int i = 1; i < N * M; i++) out[i] = 0; /* printf("Enter the first number "); readlong(a); printf("\nEnter the stepen "); scanf _s("%d", &n);*/ y[0] = y[1] = 1; for (int i = 0; i < n; i++) multiply (a, y); writelong (a); printf ("^%d=", M); writelong (y); 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