Write a program in c to find the leap year
Algorithm:-
· start
· year
· if(year%4==0) then leap year
· else not leap year
· stop
Flowchart:
Program:
#include<stdio.h> #include<conio.h> int main() { int year; clrscr(); printf("enter the year :"); scanf("%d",&year); if(year%4==0) { printf("the year %d is leap year",year); } else { printf("the year %d is not leap year",year); } return 0; }
Output:
Enter a year: 2022 2022 is not a leap year.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Algorithm:-
· start
· year
· if(year%4==0) then leap year
· else not leap year
· stop
Flowchart:
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer