Answer to Question #29592 in AJAX | JavaScript | HTML | PHP for edward maxwell

Question #29592
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.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS