online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <string.h> int main() { char answer[100]; printf("Hi! Welcome to my calculator project! Do you wanna calculate in int or a float? (int/float)\n"); scanf("%s", &answer); //Make the answer Lower case size_t length_of_answer = strlen(answer); for (size_t i = 0; i<length_of_answer; i++) { answer[i] = tolower(answer[i]); } if (strcmp(answer, "int")) { printf("TEST: int"); } else if (strcmp(answer, "float")) { printf("TEST: float"); } else { printf("Your answer is unrecognisable"); } 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