Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program to determine that year is a leap year or not integer year year = Get next input Put year to output if year %

Program to determine that year is a leap year or not integer year year = Get next input Put year to output if year % 400 == 0 Put " is a leap year" to output elseif year % 100 == 0 Put " is not a leap year" to output elseif year % 4 == 0 Put " is a leap year" to output else Put " is not a leap year" to output

Output differs. See highlights below. Special character legend

Input

1954

Your output

1954

Expected output

1954 is not a leap year. ***********This is wrong and that's why it is failing to run*************

Input

2016

Your output

2016 is a leap year.

Input

1600

Your output

1600 is a leap year.

Input

1900

Your output

1900 is not a leap year.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

(1 point) Calculate 3 sin x cos x dx.

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago