online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <math.h> #define A 13.8 #define B 1.26 #define X1 0.3 #define X2 3.3 #define DX 0.25 int main(void) { float x, y, ymin, xmin; y=(A*sin(X1))/(sqrt(X1)+B); ymin=y; xmin=X1; for(x=0.3;x<=3.3;x+=0.25) { y=(A*sin(x))/(sqrt(x)+B); if(y<ymin){ y=ymin; x=xmin; } } printf("Найменше значення функції=%f і відповідне їй значення аргумента=%f\t", ymin, xmin); return 0; } /* #include <stdio.h> #include <math.h> #define A 13.8 #define B 1.26 #define X1 0.3 #define X2 3.3 #define DX 0.25 int main(void) { float x, y, ymin, xmin; y=(A*sin(X1))/(sqrt(X1)+B); ymin=y; xmin=X1; for(x=0.3;x<=3.3;x+=0.25) { y=(A*sin(x))/(sqrt(x)+B); if(y<ymin){ y=ymin; x=xmin; } } printf("Найменше значення функції=%f і відповідне їй значення аргумента=%f\t", ymin, xmin); return 0; } /* Use "Debug" /F8 next to "RUN" option & follow steps from below Reading symbols from a.out...done. /usr/share/gdb/gdbinit: No such file or directory. (gdb) b 15 <- - - - - - - - - - - - - - - - - - - - - - - - - > !!IMP!! Note: breakpoint 1 also set at pc 0x4006c4. Breakpoint 2 at 0x4006c4: file main.c, line 15. (gdb) r <- - - - - - - - - - - - - - - - - - - - - - - - - > !!IMP!! Starting program: /home/a.out Breakpoint 1, main () at main.c:15 15 y=(A*sin(x))/(sqrt(x)+B); (gdb) display x <- - - - - - - - - - - - - - - - - - - - - - - - - > !!IMP!! 1: x = 0.300000012 (gdb) display y <- - - - - - - - - - - - - - - - - - - - - - - - - > !!IMP!! 2: y = 2.2559762 (gdb) display ymin <- - - - - - - - - - - - - - - - - - - - - - - - - > !!IMP!! 3: ymin = 2.2559762 (gdb) c <- - - - - - - - - - - - - - - - - - - - - - - - - > !!IMP!! Continuing. Breakpoint 1, main () at main.c:15 15 y=(A*sin(x))/(sqrt(x)+B); 3: ymin = 2.2559762 2: y = 2.2559762 . . . . (gdb) c <- - - - - - - - - - - - - - - - - - - - - - - - - > !!IMP!! Breakpoint 1, main () at main.c:15 */

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