code

> prob25:=proc(a,b)
cat(`Sue is paid $`,a,` per month plus a `,b,`% commission on her sales. If she sells x dollars a month, then which of the following expressions represents her total monthly earnings?`) end;

prob25 := proc(a, b)
cat(`Sue is paid $`, a, ` per month plus a `, b, `% commission on her sales. If she sells x dollars a month, t\
hen which of the following expressions represents her total monthly earnings?`)
end proc

>

>

> ?evalf

> ans25 := proc(a,b)
local p;
p[1] := a+convert(evalf(b/100,2),float)*x;
p[2] := a+b*x;
p[3] := cat(`(`,b,`*x)/`,a);
p[4] := a+b+x;
p[5] := a+convert(evalf(.1*b,2),float)*x;

[p[1],p[2],p[3],p[4],p[5]] end;

ans25 := proc(a, b)
local p;
p[1] := a + convert(evalf(1/100*b, 2), float)*x;
p[2] := a + b*x;
p[3] := cat(`(`, b, `*x)/`, a);
p[4] := a + b + x;
p[5] := a + convert(evalf(.1*b, 2), float)*x;
[p[1], p[2], p[3], p[4], p[5]]
end proc

> convert(evalf(5/100,2),float) ;

.050

>

>

>

> pr25:=proc(a,b)
makemc(prob25(a,b),ans25(a,b)) end;

pr25 := proc(a, b) makemc(prob25(a, b), ans25(a, b)) end proc