Can someone help me with my code? I'm trying to calculate the cost (x), taxes (t), and shipping cost (s) but for some reason the shipping doesn't change with the parameters I put.
prompt='How many giant slinkys do u wanna buy? '; x=input(prompt); if x<=10; x= 21.99*x; elseif (11>=x)&(x<=50); x=x*19.99; elseif (51>=x)&(x<=100); x= x*17.99; else x >= 100; x= x*15; end if x<=10; s=10; elseif (x>10)&(x<=20); s=20; elseif (x>20)&(x<=30); s=30; elseif (x>30)&(x<=40); s=40; elseif (x>40)&(x<=49); s=50; elseif (x>=50); s=0; end disp('Cost will be ') disp(x); t=x+.095*x; disp('sales tax') disp(t); disp('Shipping cost') disp(s); T=x+t+s; disp('The total cost is') disp(T)
Best Answer