MATLAB: How to prompt the user to enter a non-negative integer m

programming

how to prompt the user to enter a non-negative integer m
>> m = input ('Enter a non-negative integer: ');
>> m2 = abs(m);
>> m3 = round(m2)
As shown above, I can only write them separatly. Is there a way to include all three commands in one?

Best Answer

m3 = round(abs(input('Enter a non-negative integer: ')))