Delphi Final Sınavı Cevapları

Delphi Cevapları :
Soru1 :

Procedure TForm1.FormCreate(Sender:TObject);
Var
X:integer;
İ:integer;
j:integer;
x1:double;
x2:double;
begin
x:=strtoint(inputbox(‘1000 ile 2000 arası bir değer girin:’,’’,’’));
x1:=x;
for i:=1 to 10 do
begin
x1:=x1+(x * 0.057);
listbox1.items.add(floattostr(x1));
end;
x2:=x;
for j:= 1 to 100 do
begin
x2:=x2 + (x * 0.057);
if x2 >= 5000 then
begin
showmessage(‘para’+floattostr(j)+’ay sonra 5000 tl olmuştur’);
exit;
end;
end;
end;
end.

Soru2 :

Procedure tForm1.FormCreate(Sender:TObject);
Var
İ:integer;
Topam:integer
Sayi:integer;
Begin
Toplam:=0;
For i:=1 to 20 do
Begin
Sayi:=strtoint(inputbox(inttostr(i)+’.sayıyı giriniz’,’’,’’));
İf sayi mod 2=0 then
Toplam:=toplam+sayi;
End;
Showmessage(‘toplam:’+inttostr(toplam));
End;
End.

Soru3 :

Procedure tForm1.FormCreate(Sender:TObject);
Var
A:integer;
İ:integer;
X:double;
Begin
X:60000000;
A:=0;
For i:=0 to 10 do
Begin
A:=2000+i;
X:=x+(60000000 * 0.023);
Listbox1.items.Add(inttostr(a)+ ‘ yılı nüfusu:’ + floattostr(x));
End;
End;
End.

Soru4 :

Procedure tForm1.FormCreate(Sender:TObject);
Var
Dizi:array of integer;
Sayac:integer;
Toplam:integer;
Ortalama:string;
Sayi:integer;
Begin
Sayi:=strtoint(inputbox(‘Öğrenci sayısı:’,’’,’’));
Setlength(dizi,sayi);
Toplam:=0;
For sayac:=1 to sayi do
Begin
Dizi[sayac]:=strtoint(inputbox(inttostr(sayac)+‘.öğrencinin notunu giriniz:’,’’,’’));
Toplam:=toplam+dizi[sayac];
End;
Ortalama:=floattostr(toplam/sayi);
Show;
Canvas.Font.size:=14;
Canvas.TextOut(30,30,‘ortalama:’+ortalama);
End;
End.

Delphi Final Sınavı Cevapları

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>