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, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> #include <stdlib.h> int main() { int A[3][3], B[3], i, str, stl, max, str_max, stl_max, s = 0; printf("Massiv A\n"); for(str = 0; str < 3; str++) { for(stl = 0; stl < 3; stl++) { A[str][stl] = rand()%32; printf("%3d", A[str][stl]); } printf("\n"); } printf("\nMassiv B\n"); for(i = 0; i < 3; i++) { B[i] = rand()%32; printf("%3d", B[i]); } printf("\n"); max = A[0][0]; str_max = 0; stl_max = 0; for(str = 0; str < 3; str++) for(stl = 0; stl < 3; stl++) if(max < A[str][stl]) { max = A[str][stl]; str_max = str; stl_max = stl; } printf("max = %d\n", max); printf("str_max = %d\n", str_max); printf("stl_max = %d\n", stl_max); for(i = 0; i < 3; i++) A[str_max][i] = B[i]; printf("\nMassiv A s novoi strokoi\n"); for(str = 0; str < 3; str++) { for(stl = 0; stl < 3; stl++) printf("%3d", A[str][stl]); printf("\n"); } for(str = 0; str < 3; str++) for(stl = 0; stl < 3; stl++) s += A[str][stl]; printf("s = %d\n", s); 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