Created
January 5, 2020 02:36
-
-
Save dayvsonlima/715121f5a46660888edad98d1a412ea7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
var tamanho int | |
fmt.Println("------------------------------") | |
fmt.Println("Quantos Números vai Escrever? ") | |
fmt.Println("------------------------------") | |
fmt.Scanln(&tamanho) | |
number := make([]int, tamanho) | |
for i := 0; i < tamanho; i++ { | |
fmt.Print("Escreva um número: ") | |
fmt.Scanln(&number[i]) | |
if number[i]%2 == 0 { | |
fmt.Println("Esse é par!!") | |
} else { | |
fmt.Println("Esse não é par...") | |
} | |
} | |
fmt.Println("---------------------------------") | |
fmt.Println("Os Números que você Digitou são: ") | |
fmt.Println("---------------------------------") | |
fmt.Println(number) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment