-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHarfNotuHesaplama.kt
36 lines (31 loc) · 1.04 KB
/
HarfNotuHesaplama.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* Created by ozel on 16.7.2017.
*/
fun main(args: Array<String>) {
/*
Bu örneğimizde kullanıcıdan vize ve final notunu alıp ortalama puanını
bularak harf notunu bulmak.
Harf notu Vizenin %40 ı ile Finalin %60 ı alınarak hesaplanmıştır.
*/
print("Vize notunuzu giriniz :")
val vize: Int = readLine()!!.toInt()
print("Final notunuzu giriniz :")
val final: Int = readLine()!!.toInt()
val not = (vize * 0.4) + (final * 0.6)
if (not < 100 && not >= 70) {
println("Not ortalaması :$not")
print("Harf Notunuz : AA")
} else if (not < 70 && not >= 60) {
println("Not ortalaması :$not")
print("Harf Notunuz : BB")
} else if (not < 60 && not >= 50) {
println("Not ortalaması :$not")
print("Harf Notunuz : CC")
} else if (not < 50 && not >= 40) {
println("Not ortalaması :$not")
print("Harf Notunuz : DD")
} else if (not < 40 && not >= 0) {
println("Not ortalaması :$not")
print("Harf Notunuz : FF")
}
}