Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- /*"Criar um vetor A com 10 elementos inteiros.Implementar um programa qe defina e escreva a media
- aritmética simples dos elementos impares armazenados neste vetor*/
- int A[] = {0,1,2,3,4,5,6,7,8,9};
- for(int i=0; i < A.length; i++) {
- if(A[i]%2 != 0) {
- System.out.println(A[i] + " é um número ímpar!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement