Enviado em 09/01/2019 - 18:44h
Program test;
Var
x,y: Integer;
s, soma, subtracao: Char;
Function soma1( Var x:Integer): Integer;
Begin
x := x+y;
End;
Function subtracao1(Var x:Integer): Integer;
Begin
x := x-y;
End;
Begin
Writeln('digite o calculo desejado');
Readln(s);
writeln('digite os valores de x e y');
Readln(x,y);
If (s=soma) Then
Begin
soma1(x);
Writeln(x)
End;
If (s=subtracao) Then
Begin
subtracao1(x);
Writeln(X);
End;
End.
Var
x,y: Integer;
s, soma, subtracao: Char;
Function soma1( Var x:Integer): Integer;
Begin
x := x+y;
End;
Function subtracao1(Var x:Integer): Integer;
Begin
x := x-y;
End;
Begin
Writeln('digite o calculo desejado');
Readln(s);
writeln('digite os valores de x e y');
Readln(x,y);
If (s=soma) Then
Begin
soma1(x);
Writeln(x)
End;
If (s=subtracao) Then
Begin
subtracao1(x);
Writeln(X);
End;
End.