V
V
varhamer122015-10-11 15:00:19
Delphi
varhamer12, 2015-10-11 15:00:19

Translate this code to delphi vcl application?

Translate this code to delphi vcl application? It needs to work with buttons. Through cosol application works.
program vozrast ;
Vard,m,n: Integer;
BEGIN
Writeln('To match a man, enter 1');
Writeln('To match a girl, enter 2');
readln(n);
If n=1 Then
begin
Writeln('Enter the man's age: '); readln(m);
Writeln('Appropriate girl age: ',m/2+7:0:0);
end;
If n=2 Then
begin
Writeln('Enter girl's age: '); readln(d);
Writeln('Appropriate male age: ',d*2-14);
end;
Readln
END.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-10-11
@NeiroNx

To work with buttons, you must first make these very buttons ...
Instead of ReadLn - draw an EditText
Instead of WriteLn - draw
a Label

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question