Advertisement
Spocoman

03. Rectangle Area

Sep 12th, 2024 (edited)
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.31 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var a int
  6.     fmt.Scanln(&a)
  7.    
  8.     var b int
  9.     fmt.Scanln(&b)
  10.  
  11.     var area = a * b
  12.  
  13.     fmt.Println(area)
  14. }
  15.  
  16. ИЛИ:
  17.  
  18. package main
  19. import "fmt"
  20.  
  21. func main() {
  22.     var a, b int
  23.     fmt.Scanln(&a)
  24.     fmt.Scanln(&b)
  25.  
  26.     var area = a * b
  27.  
  28.     fmt.Println(area)
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement