MATLAB: #what is the problem in the code so that it is not accepted?

circle problem

function [area,cf]=circle(r)
cf=2*pi*r;
area=pi*r*r;
end

Best Answer

That code is accepted. But you need to store it in circle.m, and you need to pass a value on the command line:
>> [A,B] = circle(7)
A =
153.9380400259
B =
43.9822971502571