Question: Write a Java program to read five integers and perform the following: (1) Display the largest of the numbers (2) Display the smallest of the

Write a Java program to read five integers and perform the following:

(1) Display the largest of the numbers

(2) Display the smallest of the numbers

(3) Display sum of the odd numbers between 10 and 99.

(4) Display sum of the even numbers less than 100 or more than 200.

Must use:

(i)dialog box for input and output

(ii)if statement (no loop statements) only

//**************************************************************************

//

// DESCRIPTION: Program reads four integers and performs max, min, sum of even/odd numbers

// CLASS: COSC 1437

// AUTHOR:

//

//**************************************************************************

import javax.swing.JOptionPane;

public class JavaLab2 {

public JavaLab2() {

}

public static void main(String[] args) {

//add your statements here

System.exit(0);

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!