online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <stdio.h> int main() { printf("Hello World\n"); int mas[] = {-1, 2, 3, 0, 6, -7, 8, 10, 0, 1}; int N = 10; int i; int maxCount = 0; int maxLength = 0; int count = 0; int length = 0; for (i = 0; i < N - 1; i++) { if (mas[i] == 0) { if (length > maxLength) { maxLength = length; maxCount = count; } length = 0; count = 0; } else { length++; } if ((mas[i] > 0 && mas[i + 1] < 0) || (mas[i] < 0 && mas[i + 1] > 0)) count++; } if (length > maxLength) { maxLength = length; maxCount = count; } printf("%d, %d", maxLength, maxCount); 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