09-03-2013, 04:31 PM
Ecco a voi una calcolatrice realizzata da me in Delphi
OUTPUT:
Spero che questo linguaggio vi possa interessare..
Codice:
program Hello;
{$APPTYPE CONSOLE}
var a : Integer;
var b : Integer;
var c : Integer;
Function Somma(a , b : Integer) : Integer;
begin
Result := a + b;
end;
Function Sottrazione(a , b : Integer) : Integer;
begin
Result := a - b;
end;
Function Moltiplicazione(a , b : Integer) : Integer;
begin
Result := a * b;
end;
Function Divisione(a , b : Integer) : Integer;
begin
Result := a div b;
end;
begin
a := 20;
b := 4;
Writeln('--------------------------------');
Writeln('A = ' , a);
Writeln('B = ' , b);
Writeln('--------------------------------');
c := Somma(a , b);
Writeln('Somma: ' , c);
c := Sottrazione(a , b);
Writeln('Sottrazione: ' , c);
c := Moltiplicazione(a , b);
Writeln('Moltiplicazione: ' , c);
c := Divisione(a , b);
Writeln('Divisione: ' , c);
ReadLn;
end.
OUTPUT:
Codice:
--------------------------------
A = 20
B = 4
--------------------------------
Somma: 24
Sottrazione: 16
Moltiplicazione: 80
Divisione: 5
Spero che questo linguaggio vi possa interessare..