We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
varres[]int32for_,i:=rangegrades{ifi>=38{ifi%5<3{// i habis di bagi 5 sisa kurang dari 3 output ires=append(res,i)fmt.Println(i,"value index angka kurang dari 3")}else{//perhitungan penambahan pembulatanakumulate:=5-(i%5)// 5 dikurang operasi bilangan i value habis di bagi 5res=append(res,(i+akumulate))fmt.Println(i,"value index angka lebih dari 3")}}else{res=append(res,i)fmt.Println(i,"less than 38")}}returnres
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Grading Students
You are viewing a single comment's thread. Return to all comments →
Go func