online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <stdlib.h> int main() { int qntd_alunos, r, i, j; double media, reprovados; printf("Digite a quantidade total de alunos(0 para sair): "); scanf("%d", & qntd_alunos); if (qntd_alunos <= 0) { exit(1); } else { printf("Digite a média de aprovação: "); scanf("%lf", & media); for (i = 1; i <= qntd_alunos; i++) { printf("Digite a nota do %dº aluno: ", i); scanf("%lf", &reprovados); if (reprovados < media) { j += 1; } } printf("A quantidade de alunos reprovados foi de(reprovados/total): %d/%d", j, qntd_alunos); } 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