Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

iPad 7:45 anm 38%-- StudyDesk S1 2018 MAT1101 Question 3 [6 marks] Consider the following algorithm yearInput a four digit year 2. if (year mod

image text in transcribed

iPad 7:45 anm 38%-- StudyDesk S1 2018 MAT1101 Question 3 [6 marks] Consider the following algorithm yearInput a four digit year 2. if (year mod 4 -0)Divisible by 4\ 2.1 if (year mod 100 0Dvisible by 100 2.1.1 if (year mod 400 0) Divisible by 400 2.1.1.1 isLeapYear _TRUE; 2.1.2 Else 2.1.2.1 isLeapYear FALSE; 2.1.3End if 2.2 Else Not divisible by 100] 2.2.1 isLeapYear ? TRUE; 2.3 End if 3. Else Not divisible by 4] 3.1 isLeapYear ? FALSE 4. End if 5. Output isLeapYear a) Trace the algorithm starting with the input 1500 b) Document the changes that would need to be made to the algorithm after step 4 to output the number of days in a specific year. Make sure that you describe the changes in detail. End of ASSIGNMENT QUESTIONS

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions

Question

What is job rotation ?

Answered: 1 week ago