function [ ] = printFunny( v )
%PRINTFUNNY Prints numbers from a vector once or twice according to their values

% This function uses a "for" loop to process each element of v. The loop
% always prints each element once, and then a second time if the element
% is less than 3.

for x = v
    fprintf( '%f\n', x );
    if x < 3
        fprintf( '%f\n', x );
    end
end

end
