num = input('Enter a number (''q'' to quit)');
sum = 0;

while num ~= 'q'
   sum = sum + num;
   num = input('Enter a number (''q'' to quit)');
end


fprintf ('Sum = %.0f\n', sum);
