online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <stdlib.h> #include <limits.h> int main() { int numRead = 0; char numberStr[7] = {0}; while (numRead < 1) { printf("Enter a float > INT_MAX or < -INT_MAX-1: "); numRead = scanf(" %6s", &numberStr[0]); int i = 0; for (;i < 7; i++) { if (numberStr[i] == 'e' || numberStr[i] == 'E') { numberStr[i] = '.'; } } } numberStr[6] = '\0'; float val = atof(numberStr); if ((float)val < (double)(-INT_MAX-1) || (float)val > (double)INT_MAX) { printf("Winner!\n"); } else { printf("Sorry, you entered %d\n", (int)val); } 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