Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main(){
- var n int
- menuUtama(&n)
- }
- func menuView(a *int){
- fmt.Println("1. Edit")
- fmt.Println("2. Delete")
- fmt.Println("3. Cari")
- fmt.Println("4. Sorting")
- fmt.Scan(&*a)
- if *a==1{
- fmt.Println("Edit")
- menuView(&*a)
- }else if *a == 2{
- fmt.Println("Delete")
- menuView(&*a)
- }else if *a==3{
- menuCari(&*a)
- }else if *a==4{
- menuSorting(&*a)
- }else {
- menuUtama(&*a)
- }
- }
- func menuCari(d *int){
- fmt.Println("1. Silabus")
- fmt.Println("2. Materi")
- fmt.Scan(&*d)
- if *d==1{
- fmt.Println("silabus")
- //menuUtama(&*d)
- }else if *d == 2{
- //menuView(&*d)
- fmt.Println("Materi")
- }else{
- menuView(&*d)
- }
- }
- func subsorting(c * int){
- fmt.Println("1. Semester")
- fmt.Println("2. kelas")
- fmt.Scan(&*c)
- if *c == 1{
- fmt.P
- }*/
- func menuUtama(d *int){
- fmt.Println("1. Insert")
- fmt.Println("2. View")
- fmt.Scan(&*d)
- if *d==1{
- fmt.Println("Insert")
- menuUtama(&*d)
- }else if *d == 2{
- menuView(&*d)
- }else{
- menuUtama(&*d)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement