online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<stdio.h> void main() { int year; printf("Enter any year of your choice: "); scanf("%d" , &year); //get year if(year % 4 == 0) //if TRUE may be a leap year { if( year % 100 == 0) //check second condition, if false not a leap year { if ( year%400 == 0) //check thrid condition, if year is divisible by 400, it is leap year { printf("%d is a leap year.", year); } else { printf("%d is not a leap year.", year); } } else { printf("%d is a leap year.", year ); } } else { printf("%d is not a leap year.", year); } }

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