• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Find the highest and lowest value in an array

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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;
 
Ranch Hand
Posts: 216
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Nikhil Sagar
Ranch Hand
Posts: 216
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 333
Firefox Browser Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 74048
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
You'll never get away with this you overconfident blob! The most you will ever get is this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic