Advertisement
Uhuuuyy

gajisebelum.go

May 26th, 2023
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.39 KB | Source Code | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var gajiSekarang, ekspektasiGaji int
  7.  
  8.     fmt.Print("Masukkan Gaji Anda: ")
  9.     fmt.Scan(&gajiSekarang)
  10.     fmt.Print("Masukkan Gaji yang Anda Inginkan: ")
  11.     fmt.Scan(&ekspektasiGaji)
  12.     naikanGaji(gajiSekarang, ekspektasiGaji)
  13.     fmt.Printf("\nGaji Anda Sekarang %d\n", gajiSekarang)
  14. }
  15.  
  16. func naikanGaji(gajiAwal int, gajiAkhir int) {
  17.     gajiAwal = gajiAkhir
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement