write a program to print the sum of the first 10 odd integers in java
Answers
Answered by
0
Answer:
Java Program to Calculate the Sum of Odd & Even Numbers
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++)
Answered by
0
Answer:
Java Program to Calculate the Sum of Odd & Even Numbers
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++)
I hope this is helpful for you
Similar questions