Rabu, 26 Oktober 2016

KOMPLEKSITAS ALGORITMA (Tmax, Tmin, dan Tavg)

           



    KAMUS
                nilai = int
                Algoritma
                output("Masukan Nilai : ")
                 input(nilai)
               
                if 
((nilai >= 80) and(nilai <= 100))   then
                                output(nilai)
                                output("Indeks = A")
                                output("Sangat baik")
               
else if
((nilai >= 70) and (nilai < 80))       then
                                output(nilai)
                                output("Indeks = B")
                                output("Baik")
               
else if
((nilai >= 60) and (nilai < 70))       then
                                output( nilai)
                                output("Indeks = C")
                                output("Cukup")
               
else if 
((nilai >= 50) and  (nilai < 60))      then
                                output(nilai)
                                output("Indeks = D")
                                output("Kurang")
               
                else
               
                                output(nilai)
                                output("Indeks = E")
                                output("Sangat Kurang")

endif
               
                Tmin(n)                   = 3
                Tmax(n)   = 3

                Tavg(n)    = ( 1 + 2 + 3) /3