# 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

Expert's answer

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.

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 orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment