Directions...Write a program SumOfOdds that has one main method that asks the user to input two odd integers where the first is smaller than the second. The program ouputs the sum of all the odd integers from the smaller output to the larger output. You must use a while loop for this program.:)
import javax.swing.JOptionPane;
public class SumOfOdds {
public static void main (String[] args)
{
String number = JOptionPane.showInputDialog("Enter Number 1: ");
double number = Double.parseDouble(input);
String number = JOptionPane.showInputDialog("Enter a number that is greater than Number 1: ");
double number = Double.parseDouble(input);
SumOfOdds sum = new Sum(number);
while (num1<num2)
if (num1%2==1)&&(num2%2==1)
{
}
System.exit(0);
}
}