%Finds the number and the sum of the multiplicands of 3 and/or 5 that are smaller than N
N=input('Enter N:');
count=0;
s=0;
n=2;
while n<N
     n=n+1;
     if rem(n,3)==0|rem(n,5)==0
      s=s+n;
      count=count+1;
    end  
end
[count,s]
% n=3;
% while n<=N
%      if rem(n,3)==0|rem(n,5)==0
%       s=s+n;
%       count=count+1;
%      end  
%      n=n+1;
% end
% [count,s]