% Script LeapYear
  y = input('Enter the Year:');
  
% Method 1...
  if rem(y,100)~=0
     % y is not a multiple of 100
     if rem(y,4)==0
        % y is divisible by 4
        disp('366')
     else
        % y is not divisible by 4
        disp('365')
     end
  else
     % y is divisible by 100
     if rem(y,400)==0
        % y is divisible by 400
        disp('366')
     else
        % y is not divisible by 400
        disp('365')
     end
  end
  
  % Method 2...
  if rem(y,4)~=0 || (rem(y,100)==0 && rem(y,400)~=0)
      disp('365')
  else
      disp('366')
  end
  
  % Method 3...
  if rem(y,4)==0 && (rem(y,100)~=0 || rem(y,400)==0)
      disp('366')
  else
      disp('365')
  end
