Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

add comments if possible COMP 0411-WA Winter 2020 LAB 2 Due date: Wednesday, January 29 in the lab. Email submissions will NOT be accepted Write

image text in transcribed
add comments if possible
COMP 0411-WA Winter 2020 LAB 2 Due date: Wednesday, January 29 in the lab. Email submissions will NOT be accepted Write a Fortran program to prompt for and read the year that a person was born. The year must be between 1900 and 2019 (inclusive). If an invalid entry is read, the program should display the message, "Sorry, that is not a valid year." If the year is valid, the program should display the year and a message "is a leap year" or "is a common year". Include appropriate declarations, prompts, read statements, calculations, and write statements. Here is the algorithm for leap year (hint: you may need to use an intrinsic function): if (year is not divisible by 4) then it is a common year) else if (year is not divisible by 100) then it is a leap year) else if (year is not divisible by 400) then it is a common year) else (it is 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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

What are three broad categories of protists?

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago