Computer Science, asked by dhananjay3698, 1 year ago

Write a algorithm and flowchart to check if a year is a leap year

Answers

Answered by chetan2222
4
Algorithm

Algorithm of this program is −

START Step 1 → Take integer variable year Step 2 → Assign value to the variable Step 3 → Check if year is divisible by 4 but not 100, DISPLAY "leap year" Step 4 → Check if year is divisible by 400, DISPLAY "leap year" Step 5 → Otherwise, DISPLAY "not leap year" STOP

Flow Diagram

We can draw a flow diagram for this program as given below −




thank you

#chetan2222
Similar questions