online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#pragma warning(disable: 4996) #include <stdio.h> #include <math.h> int input_user(); int is_prime(); int input_user(){ int input; printf("정수를 입력하세요 >> "); scanf("%d", &input); return input; } int is_prime(){ int input; int result; input = input_user(); if(input <= 1) result = 0; for(int i = 2; i <= sqrt(input); ++i){ // 제곱근 함수를 이용해 연산시간을 줄임 if(input % i == 0){ printf("%d는 소수가 아닙니다.", input); } // 결과를 만들고 코드 최적화하는게 좋다. } printf("%d는 소수입니다.", input); } int main() { is_prime(); 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