online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <time.h> int throwDice(); int getUserGuess(); void playGuessingGame(); int throwDice(){ return rand() % 6 + 1; } int getUserGuess(){ int guess; printf("μ£Όμ‚¬μœ„μ— λ‚˜μ˜¬ 숫자λ₯Ό λ§žν˜€λ³΄μ„Έμš”(1~6): "); scanf("%d",&guess); return guess; } void playGuessingGame(){ int userGuess, diceResult; // do while 문은 ν•œλ²ˆμ€ μ‹€ν–‰ do{ userGuess = getUserGuess(); diceResult = throwDice(); printf("μ£Όμ‚¬μœ„ κ²°κ³Ό : %d\n",diceResult); if(userGuess == diceResult){ printf("μΆ•ν•˜ν•©λ‹ˆλ‹€. μ •λ‹΅μž…λ‹ˆλ‹€!\n"); } else{ printf("μ•„μ‰½λ„€μš” λ‹€μ‹œ μ‹œλ„ν•˜μ„Έμš”.\n"); } } while(userGuess != 0); } int main() { srand(time(NULL)); printf("숫자 λ§Œλ“€κΈ° κ²Œμž„μ„ μ‹œμž‘ν•©λ‹ˆλ‹€,\n"); playGuessingGame(); printf("κ²Œμž„ μ’…λ£Œ\n"); 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