for loop to get the largest number

hi therehow do i write a for loop to get the largest number in the loop..this loop is dynamic..thank you
[118 byte] By [bronze-starDukes] at [2007-11-26 12:15:11]
# 1
pls post yyour code a nd what do u want exactly
bronzestar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 2
What is a 'largest number in the loop' ? What is a 'dynamic loop' and if you define this, can you define a 'static' loop?Mike
silverstar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 3
> What is a 'largest number in the loop' ? What is a> 'dynamic loop' and if you define this, can you define> a 'static' loop?> > MikeThat was funny. :-)
bronzestar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 4
Post what you have, start it up on your own and then we'll gladly point you in the right direction!
bronzestar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 5

> hi there

> how do i write a for loop to get the largest number

> in the loop..this loop is dynamic..thank you

In addition to the other comments (try it and post your efforts; communicate your problem more clearly and precisely), think about how you'd do it by hand. Assume you have a bunch of cards with different numbers on them, and you just look at them one at a time. How would you determine what the largest value written on those cards is?

platinumsta at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 6
> hi there> how do i write a for loop to get the largest number> in the loop..this loop is dynamic..thank youYour numbers are saved in array ?
bronzestar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 7

class homeworkquestion

{

op.asking(question);

op.notputtingeffort();

if(op!=putingeffort)

{

op=lazybum;

op.teacherpunishment();

}

else

{

op.forumhelp();

op.accolade();

}

}

silverstar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 8

> What is a 'largest number in the loop' ? What is a

> 'dynamic loop' and if you define this, can you define

> a 'static' loop?

>

long max = 1

for (long i = 0; i < max; i++) {

max++;

}

bronzestar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 9

I guess we can put this code in a lot of threads!

> > class homeworkquestion

> {

> op.asking(question);

> op.notputtingeffort();

> if(op!=putingeffort)

> {

> op=lazybum;

> op.teacherpunishment();

> }

> else

> {

> op.forumhelp();

> op.accolade();

> }

> }

>

bronzestar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...
# 10
it is ok guys i solve it already and i am not lazy. actually it is easy i just have to declare it to a variable and it works..haha thanks a lot...
bronzestar at 2007-7-7 14:18:46 > top of Java-index,Archived Forums,Socket Programming...