Computer Science, asked by xord1157, 9 months ago

write a program in JAVA to input the following number in a single dimensional array and find out the highest marks : 78,25,58,77,91

please please please don't spam for points

I really need the answer it's a very very important question​

Answers

Answered by amityadav7246
0

Answer:

import java.util.Scanner;

public class Numbers {

public static void main(String[] args) {

int num1, num2,num3,num4,num5;

Scanner ip = new Scanner(System.in);

System.out.print("Enter num1: ");

num1 = ip.nextInt();

System.out.print("Enter num2: ");

num2 = ip.nextInt();

System.out.print("Enter num3: ");

num3 = ip.nextInt();

System.out.print("Enter num4: ");

num4 = ip.nextInt();

System.out.print("Enter num5: ");

num5 = ip.nextInt();

if (num1 > num2)

System.out.println(num1 + " is greater that " + num2);

else if (num2 > num1)

System.out.println(num2 + " is greater that " + num1);

Similar questions