online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> // 표준 입출력 함수 int main(){ // 프로그램 시작, main 함수 정의 int year; // 입력받을 연도를 저장할 변수 선언 printf("연도를 입력하세요: "); scanf("%d", &year); // 입력값을 변수 year에 저장, &year는 입력 값을 저장할 메모리 주소 if ((year % 4 == 0 && year % 100 !=0) || year % 400 == 0){ // 윤년을 판별하는 조건문 // or(||) 앞의 항에서 괄호를 제거해도 정상 작동 /* 윤년의 조건: 1. 4의 배수이면서 100의 배수가 아닌 경우 → 윤년 2. 또는 400의 배수인 경우 → 윤년 */ printf("윤년입니다\n"); // 윤년일 경우 출력 } else { // 위의 조건이 모두 거짓일 때 실행 → 평년 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