PhysicsTeacher.in

High School Physics + more

greatest and smallest numbers – Java Program

Java Program to find the greatest and smallest numbers

Write a Java program to accept 10 different numbers and display the greatest and smallest numbers from the set of numbers entered by the user. Find the greatest and smallest numbers – Java Program import java.util.Scanner;public class HighestLowest {public static void main(String[] args) {int num,i; int highest=0,lowest=0;Scanner s = new Scanner(System.in);System.out.println(“Enter 10 different numbers:”);for(i=1;i<=10;i++) { […]

Scroll to top
error: physicsTeacher.in