JAVA: Write an application that calculates the product of the odd integers from 5 to 21.
Code:
public class Main
{
public static void main(String[] args) {
float n=1;
for(float i=5;i<=21;i++)
{
if(i%2!=0)
{
n=n*i;
}
}
System.out.println("The result
is:"+n);
}
}
Image for understanding:

Ouput:

JAVA: Write an application that calculates the product of the odd integers from 5 to 21.
Write a java application to input 2 positive integers X and Y such that X is less than Y. Then the program should do the following: 1. Output the sum of even integers between 1 and X. 2. Output the average of odd integers between 1 and Y. 3. Output the common divisors of X and Y.
write a java program that calculates the average of n odd numbers, where the value of n is given by the user.
java
1. Write an application that generates n random integers in the range provided the user. Use method genrate Even to generate even numbers only and generateOdd to generate odd numbers void generateOdd(int n, int r1, int r2); void generateEven(int n, int r1, int r2); Sample run: How many integers you have?5 What are your number ranges? 3 10 The generated even numbers are 6 4 8 10 6 The generated odd numbers are 37 9 35
/*Write a Java program that generates 1000 random integers, * calculates the average and prints two counts, one for the * numbers lower than the average and one for the numbers larger than the average. */ Use java thanks
Write a java program that asks the user to enter 2 integers, obtains them from the user, determines if they are even or odd numbers and prints their sum, product, difference, and quotient (Division).
How to write java application that reads an integer, then determines and display whether it's odd or even. Use the remainder operator.
java
CountDigits.java Write a program that calculates and prints, the sum and product of all the digits in an integer value read from the keyboard.
Write a Python program that calculates the product of all odd numbers between 1 and 20 (1x3x5x7x9x11x13x15x17x19), using the for loop and the range function.
Consecutive Odd Integers The product of two consecutive odd integers is 143. Find the integers . Elementary Algebra (3rd edition), Chapter 6.6, Question 96E
JAVA HELP! Question: Write a Java console application that investigates how well Java handles large integers. Write two loops that iterate from 0 through 35. Before each loop, set an integer variable (IV) to 1. Within each loop, print the loop count and the value of IV formatted in two columns. Within the first loop, multiply IV by 2. Within the second loop, multiply IV by the appropriate StrictMath method. The second loop will not complete since there will eventually...