Arsip: pilih nilai terbersar???
more 14 years ago
akudana
saya mau tanya disini saya punya StringGrid1.Cells[1,2] = 5 ,StringGrid1.Cells[4,5] = 9 dan StringGrid1.Cells[3,5] = 3, saya mau tanya bisa,
ga cari nilai terbesarnya??? kemudian nilai terbesar masukkin di StringGrid1.Cells[3,3].. bisa ga??? tolong sekalian kodenya..
more 14 years ago
ImanD
Bisa!!! :D
pertanyaan simple dan jawabn se-simple2 nya
begin
if StringGrid1.Cells[1,2] > StringGrid1.Cells[4,5] then
if StringGrid1.Cells[1,2] > StringGrid1.Cells[3,5] then
StringGrid1.Cells[3,3]:=StringGrid1.Cells[1,2]
else
StringGrid1.Cells[3,3]:=StringGrid1.Cells[3,5]
else if StringGrid1.Cells[4,5] > StringGrid1.Cells[3,5] then
StringGrid1.Cells[3,3]:=StringGrid1.Cells[4,5]
else
StringGrid1.Cells[3,3]:=StringGrid1.Cells[3,5];
end;
notes:
untung nilainya max 9 jadi ga perlu konversi ke angka dulu. :D
more 14 years ago
akudana
@ImanD: Bisa!!! :D pertanyaan simple dan jawabn se-simple2 nyaoyaa, kalau bagaimana cari nilai terbesar dari elemen stringgrid yang terdiri dari 5 baris???? mohon bantuannya... notes: untung nilainya max 9 jadi ga perlu konversi ke angka dulu. :Dbegin if StringGrid1.Cells[1,2] > StringGrid1.Cells[4,5] then if StringGrid1.Cells[1,2] > StringGrid1.Cells[3,5] then StringGrid1.Cells[3,3]:=StringGrid1.Cells[1,2] else StringGrid1.Cells[3,3]:=StringGrid1.Cells[3,5] else if StringGrid1.Cells[4,5] > StringGrid1.Cells[3,5] then StringGrid1.Cells[3,3]:=StringGrid1.Cells[4,5] else StringGrid1.Cells[3,3]:=StringGrid1.Cells[3,5]; end;
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 4 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- Nanya buat input pake grid
by Mahiachi in Paradox more 16 years ago - component stringgrig bisa lookup database
by ImanD in Tip n Trik Pemrograman more 17 years ago - Hitung Umur
by Gratz in Hal umum tentang Pascal Indonesia more 17 years ago - membaca pdf dan .doc di memo atau rich edit?
by r088yj in Tip n Trik Pemrograman more 18 years ago - kernel32.dll error??Tapi kayaknya bukan virus!!
by darkwind in Bedah Kasus more 15 years ago - Siapa yang gak pelit???
by n3o_cybertech in Tip n Trik Pemrograman more 17 years ago - [ASK] None of the dynamic libraries can be found libpq.dll
by pai_chan in Lain-lain more 16 years ago - Insert Data ke MySQL
by coacoac in Tip n Trik Pemrograman more 17 years ago - Trigger To Delphi
by umarbakri in Hal umum tentang Pascal Indonesia more 17 years ago - connect mysql to php
by cucu in MySQL more 15 years ago