Advertisement
sabdas4869

tubes

Nov 11th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4.  
  5. func main(){
  6.  
  7. var n int
  8.  
  9. menuUtama(&n)
  10.  
  11.  
  12.  
  13.  
  14. }
  15. func menuView(a *int){
  16.  
  17. fmt.Println("1. Edit")
  18. fmt.Println("2. Delete")
  19. fmt.Println("3. Cari")
  20. fmt.Println("4. Sorting")
  21.  
  22. fmt.Scan(&*a)
  23.  
  24. if *a==1{
  25. fmt.Println("Edit")
  26. menuView(&*a)
  27. }else if *a == 2{
  28. fmt.Println("Delete")
  29. menuView(&*a)
  30. }else if *a==3{
  31. menuCari(&*a)
  32. }else if *a==4{
  33. menuSorting(&*a)
  34. }else {
  35. menuUtama(&*a)
  36.  
  37. }
  38. }
  39.  
  40.  
  41.  
  42.  
  43. func menuCari(d *int){
  44. fmt.Println("1. Silabus")
  45. fmt.Println("2. Materi")
  46. fmt.Scan(&*d)
  47.  
  48. if *d==1{
  49. fmt.Println("silabus")
  50. //menuUtama(&*d)
  51. }else if *d == 2{
  52. //menuView(&*d)
  53. fmt.Println("Materi")
  54. }else{
  55. menuView(&*d)
  56. }
  57.  
  58.  
  59. }
  60.  
  61. func subsorting(c * int){
  62. fmt.Println("1. Semester")
  63. fmt.Println("2. kelas")
  64. fmt.Scan(&*c)
  65. if *c == 1{
  66. fmt.P
  67.  
  68.  
  69.  
  70. }*/
  71.  
  72. func menuUtama(d *int){
  73.  
  74. fmt.Println("1. Insert")
  75. fmt.Println("2. View")
  76. fmt.Scan(&*d)
  77.  
  78. if *d==1{
  79. fmt.Println("Insert")
  80. menuUtama(&*d)
  81. }else if *d == 2{
  82. menuView(&*d)
  83. }else{
  84. menuUtama(&*d)
  85.  
  86. }
  87.  
  88.  
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement