online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <assert.h> #include <stdio.h> #include <stdlib.h> void read_numbers(int *dst, int count); int main() { enum { N = 3 }; int numbers[N]; read_numbers(numbers, N); char all_equal = 1; int max = numbers[0]; for (int i = 1; i < N; i++) { all_equal = all_equal && numbers[i] == max; if (numbers[i] > max) max = numbers[i]; } if (all_equal) printf("All numbers are equal.\n"); else printf("%d is the greatest among the numbers entered.\n", max); } void read_numbers(int *dst, int count) { assert(count > 0); printf("Enter %d numbers.\n", count); for (int i = 0; i < count; /*empty*/) { printf("#%d: ", i+1); int c = scanf("%d", &dst[i]); if (c == EOF) abort(); if (c != 1) { printf("Sorry, invalid input. Try again.\n"); while ((c = getchar()) != EOF && c != '\n'); if (c == EOF) abort(); } else i++; } }

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