develop a menu driven program in psuedocode that inputs two numbers and at the users option finds their sum difference product or quotient
1
Expert's answer
2013-05-13T11:36:54-0400
program calculator; uses crt; var a,b,c:real; x:integer; Begin Writeln('Enter two numbers'); Readln(a,b); Writeln(' Select action'); Writeln('1-"+" 2-"-" 3-"*"4-"/"'); Readln(x); case x of 1: beginc:=a+b; Writeln(c:2:2); end; 2: beginc:=a-b; Writeln(c:2:2); end; 3: begin c:=a*b; Writeln(c:2:2); end; 4: if b=0 thenWriteln(' It is impossible to divide into zero') elsebegin c:=a/b; Writeln(c:2:2); end; end; Readln; end.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment