online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
// LAB_7-2.c #pragma warning(disable:4996) #include <stdio.h> // printf, scanf #include <math.h> // sqrt // num이 μ†Œμˆ˜μ΄λ©΄ 1, μ•„λ‹ˆλ©΄ 0 λ°˜ν™˜ int isPrime(int num) { if (num <= 1) return 0; // 1 μ΄ν•˜λ©΄ μ†Œμˆ˜ μ•„λ‹˜ for (int i = 2; i <= (int)sqrt(num); i++) { if (num % i == 0) return 0; // λ‚˜λˆ„μ–΄ λ–¨μ–΄μ§€λ©΄ μ†Œμˆ˜ μ•„λ‹˜ } return 1; // μœ„ 반볡 ν†΅κ³Όν•˜λ©΄ μ†Œμˆ˜ } int main(void) { int num; printf("μ •μˆ˜λ₯Ό μž…λ ₯ν•˜μ„Έμš”: "); scanf("%d", &num); if (isPrime(num)) { printf("%dλŠ” μ†Œμˆ˜μž…λ‹ˆλ‹€.\n", num); } else { printf("%dλŠ” μ†Œμˆ˜κ°€ μ•„λ‹™λ‹ˆλ‹€.\n", num); } 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