function [mpay] = loan(amount,rate,years)
%H synartisi loan upologizei ti miniaia dosi tou daneiou
%Metavlites eisodou: 
%amount: to kefalaio tou daneiou se eurw
%rate: to etisio epitokio se monades
%years: arithmos twn etwn tou daneiou
%Metavliti exodou:
%mpay: minaia dosi tou daneiou
 format bank
 ratem=rate*0.01/12;
 a=1+ratem;
 mpay=amount*(ratem/(1-(a)^(-12*years)));
