N=13;
total=0;

for k=1:N
    if mod(k,2)==1
        total=total+k;
    end
end

disp(['Sum of odd numbers from 1 to ' num2str(N) ' is ' num2str(total)])
