Buat yang tugas TIK nya pusing, nih codingnya:
Rata-rata
TextBox6 = (TextBox1) / 5 + (TextBox2) / 5 + (TextBox3) / 5 + (TextBox4) / 5 + (TextBox5) / 5
Buat angka terbesar:
If (TextBox1 - TextBox2) >= 0 And (TextBox1 - TextBox3) >= 0 And (TextBox1 - TextBox4) >= 0 And (TextBox1 - TextBox5) >= 0 Then TextBox7 = TextBox1
If (TextBox2 - TextBox1) >= 0 And (TextBox2 - TextBox3) >= 0 And (TextBox2 - TextBox4) >= 0 And (TextBox2 - TextBox5) >= 0 Then TextBox7 = TextBox2
If (TextBox3 - TextBox1) >= 0 And (TextBox3 - TextBox2) >= 0 And (TextBox3 - TextBox4) >= 0 And (TextBox3 - TextBox5) >= 0 Then TextBox7 = TextBox3
If (TextBox4 - TextBox1) >= 0 And (TextBox4 - TextBox2) >= 0 And (TextBox4 - TextBox3) >= 0 And (TextBox4 - TextBox5) >= 0 Then TextBox7 = TextBox4
If (TextBox5 - TextBox1) >= 0 And (TextBox5 - TextBox2) >= 0 And (TextBox5 - TextBox3) >= 0 And (TextBox5 - TextBox4) >= 0 Then TextBox7 = TextBox5
Buat terkecilnya:
If (TextBox1 - TextBox2) <= 0 And (TextBox1 - TextBox3) <= 0 And (TextBox1 - TextBox4) <= 0 And (TextBox1 - TextBox5) <= 0 Then TextBox8 = TextBox1
If (TextBox2 - TextBox1) <= 0 And (TextBox2 - TextBox3) <= 0 And (TextBox2 - TextBox4) <= 0 And (TextBox2 - TextBox5) <= 0 Then TextBox8 = TextBox2
If (TextBox3 - TextBox1) <= 0 And (TextBox3 - TextBox2) <= 0 And (TextBox3 - TextBox4) <= 0 And (TextBox3 - TextBox5) <= 0 Then TextBox8 = TextBox3
If (TextBox4 - TextBox1) <= 0 And (TextBox4 - TextBox2) <= 0 And (TextBox4 - TextBox3) <= 0 And (TextBox4 - TextBox5) <= 0 Then TextBox8 = TextBox4
If (TextBox5 - TextBox1) <= 0 And (TextBox5 - TextBox2) <= 0 And (TextBox5 - TextBox3) <= 0 And (TextBox5 - TextBox4) <= 0 Then TextBox8 = TextBox5
Makasih udah ngunjungi, tapi lain kali kerja sendiri ya :D
No comments:
Post a Comment