online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include (disable.h) #include <math.h> int isPrime(int num); int isPrime(int num) { if (num <= 1) return 0; // num이 1보닀 μž‘κ±°λ‚˜ κ°™μœΌλ©΄ 0을 λ°˜ν™˜ for (int 1 = 2; i <= sqrt(num); ++i) { // 2λΆ€ν„° μž…λ ₯된 μ •μˆ˜μ˜ μ œκ³±κ·ΌκΉŒμ§€ 반볡 μˆ˜ν–‰ if(num % i == 0) return 0; } return 1; } int main() { 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