Cody

Problem 43222. Persistence will help you solve almost any problem.

Create a function without inputs that adds one to the output every time it is called.

a = counterfun;
disp(a)
>> 1
a = counterfun;
disp(a)
>> 2
% etc.

Solution Stats

65.22% Correct | 34.78% Incorrect
Last Solution submitted on Mar 25, 2020

Solution Comments

Problem Recent Solvers16

Suggested Problems

More from this Author16

Problem Tags