Mushi

ifelse.go

Apr 25th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.29 KB | None | 0 0
  1. // controles ifelse ifelse.go
  2. package main
  3.  
  4. import "fmt"
  5.  
  6. func imprimirResultado(nota float64){
  7.     if nota >= 7 {
  8.         fmt.Println("Aprovado com nota", nota)
  9.     } else {
  10.         fmt.Println("Reprovado com nota", nota)
  11.     }
  12.  
  13. }
  14. func main() {
  15.     imprimirResultado(7.3)
  16.     imprimirResultado(5.1)
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment