clear all;
close all;
display('A simple calculator');

A = input('Enter the first number: ');
B = input('Enter the second number: ');

display('1.Subtract the two numbers');
display('2.Sum the two numbers');
display('3.Divide the two numbers');
display('4.Multiply the two numbers');

choice = input('Make your choice: ');
%%
if(choice < 1 || choice > 4)
    input('Your choice is wrong, enter a number between 1 and 4\n')
else
    display('You entered a correct number !!!')
end


switch (choice)
    case 1
        display('Difference is :')
        A-B
    case 2
        display('The sum of the two numbers is ');
        display(A+B);
    case 3
        if(B == 0)
            display('Division by zero is impossible');
            
        else    
            display('The division result is ');
            display(A/B);
        end
    case 4
        display('The product of the two numbers is ');
        A*B
end