%syntax:vote(age)
%gives the o/p wether the person is eligible for vote or not
function vote(age)
age=input('enter the age of the person::');
if(age>=18)
fprintf('age=%d so person is eligible for the vote',age)
else
fprintf('age=%d so person is not eligable for vote',age)
end
%gives the o/p wether the person is eligible for vote or not
function vote(age)
age=input('enter the age of the person::');
if(age>=18)
fprintf('age=%d so person is eligible for the vote',age)
else
fprintf('age=%d so person is not eligable for vote',age)
end
No comments:
Post a Comment