Question: Given the integer array averageTemps with the size of ARR _ VALS, write a for loop that sets sumOdds to the sum of all the
Given the integer array averageTemps with the size of ARRVALS, write a for loop that sets sumOdds to the sum of all the odd integers in averageTemps.
Ex: If the input is then the output is:
Odd sum:
import java.util.Scanner;
public class OddOperations
public static void mainString args
Scanner scnr new ScannerSystem in;
final int ARRVALS ;
int averageTemps new int ARRVALS;
int ;
int sumdds;
for averageTemps. length;
averageTemps scnr nextInt ;
Y Your code goes here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
