Answer the following questions for the problem listed below
Solution
At first, we take three inputs: Original Price of the item, Sale percentage i.e., discount offer, Tax percentage.
It is a known fact that the MATLAB does not require any datatype declaration. whatever the numerical value we offer as input, it will read the value and assign accordingly. At some cases, if we need to explicitly declare the variables it\'s better to take them in float variables, since Values of these inputs may be in decimals.
Now, we are representing \'x\' to read the original price of the item, \'y\' to read sale percentage i.e., Discount offer, \'z\' to read tax percentage being imposed on the item.
After reading them, we\'ll calculate amount being discounted by sale percentage which is represented by \'s\'. Later, we\'ll calculate Current rate of the item = Original price - amount being discounted[s], this is held by \'crate\'. Now we\'ll calculate tax percentage represented by \'tax\'. Finally we calculate final sale price of the item represented by \'final\'.
Matlab code for the process is:
disp(\'Please Enter \');
 x = input(\'Original Price:\');
 y = input(\'sale Percentage:\');
 z = input(\'Tax Percentage:\');
 s = y*x/100;
 crate = x-s;
 tax = z*crate/100;
 final = crate+tax;
 disp(final);
The Last statement : disp(final); displays final price of the item on screen

