answersLogoWhite

0


Best Answer

Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }

Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }

Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }

Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to find the largest of n numbers in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?


Write a C plus plus program and flow chart to find the largest of the 3 numbers?

To find the largest of three numbers, first find the largest of two numbers: int max (int x, int y) { return x&lt;y?y:x; } Now you can use this one function to find the largest of three numbers: int max (int x, int y, int z) { return max (max (x, y), z); }


Write a Shell program to find the smallest number from a set of numbers?

k


How to write a program that ask user to enter numbers until user enter- 0 then find the biggest of entered numbers in C programming using while or do while?

int i, largest=0;do { scanf ("Enter a number (0 to exit): %d", i); if (i&gt;largest) largest=i; } while (i!=0); printf ("Largest number is: %d\n", largest);


How do you write a c program to find largest of 3 numbers using pointers?

Find the largest of two, then find the largest of that value and the third value. int* max (int* a, int* b) { return (a*) &gt; (b*) ? a : b; } int* max_of_three (int* a, int* b, int* c) { return max (max (a, b), c); }


What is the largest prime no that is stored in 8 bit pattern?

Write your own prime number program and find out.


Write a program to find the product of two numbers using Halving and Doubling method?

i need this answer


Write a C program to find the square of two numbers?

Please visit http://talentsealed.blogspot.com/2009/10/to-find-sqaure-of-numbers-using-c.htmlfor the answer.


Write a C program to find the sum of all prime numbers?

Since there is an infinite set of prime numbers the answer would be infinity.


Write a c plus plus program to find the largest among three numbers using ternary operators?

R = (A &gt; B &amp;&amp; A &gt; C) ? A : (B &gt; C) ? B : C; // parentheses not necessary - for clarity only