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> #include <stdlib.h> void main() { int n, i = 0, re = 0, soma, k = 0; do { printf("informe quantos numeros tem na fileira: "); scanf("%d", & n); if (n <= 0 || n > 1000000) printf("valor invalido!\n\n informe outro:\n"); } while (n < 0 || n > 1000000); int numeros[n]; for (i = 0; i < n; i++) { do { printf("informe os numeros(de 1 a 1000): "); scanf("%d", & numeros[i]); if ((numeros[i] < 0 || numeros[i] > 1000)) printf("valor invalido!\n\n informe outro:\n"); } while (numeros[i] < 0 || numeros[i] > 1000); } for (i = 0; i < n; i++) { soma = 0; for (k = i; k < n; k++) { soma = soma + numeros[k]; if (soma % 8 == 0) { re++; } } } printf("\n\n%d", re); }

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