Input and fprintf

some notes

% conditional statemetn if-elseif-else-end
clear;clc;
a = input ('Enter first number: ');
b = input('Enter second number: ');
if a>b
    fprintf('%f is greater than %f\n',a,b);
elseif a ==b
    fprintf('%f is equal  to %f\n',a,b);
else
    fprintf('%f is less than %f\n',a,b);
end

results matching ""

    No results matching ""