473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Find maximum of series of numbers

hi i am scAry,from phillipines.A beginner about java programming.Anybody can help me? i need a code to how to write a java program that will ask for five numbers and will display the largest one by using DoWhile stament.....
I hope can help me,reply as soon as possible.

Thank you.
God Bless us all!!
Aug 31 '07 #1
3 2844
JosAH
11,448 Expert 8TB
Hi, I changed your topic title to something sensible so people might be interested
to know what your question is about.

kind regards,

Jos
Aug 31 '07 #2
JosAH
11,448 Expert 8TB
hi i am scAry,from phillipines.A beginner about java programming.Anybody can help me? i need a code to how to write a java program that will ask for five numbers and will display the largest one by using DoWhile stament.....
I hope can help me,reply as soon as possible.

Thank you.
God Bless us all!!
Have you thought about this little problem yourself? Imagine that you can hold
one number in each hand. I give you numbers, one by one, you have to drop
one number and accept my new number; when I am out of numbers you're
supposed to carry one number: the maximum value of all numbers. Try to
visualize that process and you're almost in business.

Pay special attention to the 'special cases' where I don't give you any number
at all or just one number.

kind regards,

Jos
Aug 31 '07 #3
kreagan
153 100+
hi i am scAry,from phillipines.A beginner about java programming.Anybody can help me? i need a code to how to write a java program that will ask for five numbers and will display the largest one by using DoWhile stament.....
I hope can help me,reply as soon as possible.

Thank you.
God Bless us all!!
Jos gave you the logic behind this question. I remember being new to java and being absolutely overwhelmed.

Java API
Take a look at the scanner class. This will allow you to take in input.

System.out.println( String ) is the command to output to the user.

The rest is normal high level programming constructs such as for loop, do while loops and if statements. Hopefully this will give you enough information to research on your own.

~Kat
Aug 31 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Christopher M. Pieper | last post by:
I want to generate a resultset that is just a series of numbers in ascending order or perhaps a series of dates.. What I mean is, is there a way to generate a temporary table of dates given an...
6
by: Jenn L | last post by:
I have a database that is pre-populated with sequential part numbers. As people reserve the parts I update a flag to show the # is no longer available. Now they want the ability to take out a...
21
by: Imran | last post by:
I have a vector of integers, such as and I want to find out the number which occurs most frequently.what is the quick method. My array size is huge. what I am doing is 1. find out the...
4
by: geoffp | last post by:
I need to generate reproducible random number series. I've done the obvious - use mt_srand with the same seed. This supposedly will create the same series every time. Is this true? Its not...
8
by: srinpraveen | last post by:
I know to write a program to print the fibonacci series. But the problem is my teacher has asked us to write a program to print the natural numbers that are not involved in the fibonacci series. For...
29
by: garyusenet | last post by:
I'm trying to investigate the maximum size of different variable types. I'm using INT as my starting variable for exploration. I know that the maximum number that the int variable can take is:...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the VScrollBar and set it as follow: m_vScrollBar.Minimum = -19602; m_vScrollBar.Maximum = 0; m_vScrollBar.SmallChange = 1; m_vScrollBar.LargeChange = 1089; m_vScrollBar.Value =...
11
by: zj262144 | last post by:
Hi, I'm a C beginner. I want to write a C. The pseudocodes are like this: User enters some numbers (use -1 to end) The compiler find and delete the maximum and minimum numbers Then average...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.