online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#pragma warning(disable: 4996) #include <stdio.h> #include <stdlib.h> #include <time.h> int throw_dise(); int input_user(); void play_dise(); int main() { srand(time(NULL)); printf("주사위 숫자 맞히기 게임을 시작합니다.\n"); play_dise(); printf("게임 종료. \n"); return 0; } int throw_dise(){ return rand() % 6 + 1; } int input_user(){ int input; printf("숫자를 맞혀보세요(1 ~ 6) >> "); scanf("%d", &input); return input; } void play_dise(){ int user_guess, dise_result; while(1){ user_guess = input_user(); dise_result = throw_dise(); if(user_guess == dise_result){ printf("축하합니다! \n"); printf("주사위 값 : %d \n", dise_result); break; }else if(user_guess == 0){ printf("게임을 종료합니다. \n"); printf("주사위 값 : %d \n", dise_result); break; }else if(user_guess >= 1 && user_guess <= 6){ printf("숫자가 다릅니다.\n"); }else{ printf("잘못된 값을 입력하셨습니다. \n"); } } }

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