Computer Science, asked by Sachinsachii, 2 months ago

java program to find the difference between the sum of even and odd numbers in an array using scanner.​

Answers

Answered by leehun
2

Answer:

hope it's helpful to you

Explanation:

public class Sum_Odd_Even.

int n, sumE = 0, sumO = 0;

Scanner s = new Scanner(System.

System. out. print("Enter the number of elements in array:");

n = s. nextInt();

int[] a = new int[n];

System. out. println("Enter the elements of the array:");

for(int i = 0; i < n; i++)

Similar questions