| Author |
Find the highest and lowest value in an array
|
jade sayson
Greenhorn
Joined: Oct 01, 2012
Posts: 1
|
|
can you help me,about multidimentional arrays that can write a program that determines the highest and the lowest of the 12 input values?..
there are 12 numbers to enter:
13 15 20 13 35 40 16 18 20 18 20 14
the is output is:
enter twelve numbers
highest:_____
lowest:_____
thanks again;
|
 |
Nikhil Sagar
Ranch Hand
Joined: Apr 21, 2012
Posts: 214
|
|
Hi jade, and welcome to the Ranch.
First of all you need to understand some rules of posting on this site.
Don't worry they are just like the general rules to post on any forum around the web. So, it is my request to read them carefully.
HowToAnswerOnJavaRanch and HowToAskQuestionsOnJavaRanch
|
OCPJP 6 86%
|
 |
Nikhil Sagar
Ranch Hand
Joined: Apr 21, 2012
Posts: 214
|
|
jade sayson wrote:can you help me,about multidimentional arrays that can write a program that determines the highest and the lowest of the 12 input values?..
there are 12 numbers to enter:
13 15 20 13 35 40 16 18 20 18 20 14
the is output is:
enter twelve numbers
highest:_____
lowest:_____
thanks again;
Here we want to help you dear, but you are asking us not to help you but to do your home work.
It looks like a home work if not then its better if you ShowSomeEfforts
|
 |
Enkita mody
Ranch Hand
Joined: Aug 06, 2012
Posts: 333
|
|
|
We can't write that program for you.You have to do yourself, but if you find any doubt in it surely ranchers will help you.
|
OCA7
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32644
|
|
Welcome (again)
Beware of saying multidimensional array, because Java doesn’t have them. It has arrays of arrays instead, which are better.
You should be doing largest and smallest on a 1‑dimensional array anyway. It is quite simple. You need to write it down with pencil paper and eraser (the latter being the most important), and you will then find it easy to convert to real code.
|
 |
Jelle Klap
Bartender
Joined: Mar 10, 2008
Posts: 1405
|
|
Hi jade, and welcome to JavaRanch!
It would be really helpful if you could give us an idea of what you've tried so far and where you're stuck.
My advice for now would be to forget about the input business.
Just write a program that uses a hard-coded set of numbers and write the logic to determine the highest and lowest value.
You could tie that logic to dynamic input at a later stage.
Edit: Ugh, too slow (again)
|
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
|
 |
 |
|
|
subject: Find the highest and lowest value in an array
|
|
|