function [p,y]=division(a,b)
%Ypologismos pilikou kai ypolipou me prostheseis kai afaireseis
p=0;
y=a;
while y>=b %oso to upoloipo einai megalytero h iso tou diaireti
y=y-b;
p=p+1;
end

% H epalitheusi ginetai pliktrologwntas:
% 
%[p,y]=division(17,3)
% p =
% 5
% y =
% 2

%a=p*b+y
