online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Welcome to blackNwhite Question :- Write a program in c about how to check whether the entered year is leap year or not using else statement . *******************************************************************************/ #include <stdio.h> int main() { int year; // Ask the user to enter a year printf("Enter a year: "); scanf("%d", &year); // Check if the entered year is a leap year if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) { // If the conditions for a leap year are met, print that it is a leap year printf("%d is a leap year.\n", year); } else { // If the conditions for a leap year are not met, print that it is not a leap year printf("%d is not a leap year.\n", year); } 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