> 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?
class homeworkquestion
{
op.asking(question);
op.notputtingeffort();
if(op!=putingeffort)
{
op=lazybum;
op.teacherpunishment();
}
else
{
op.forumhelp();
op.accolade();
}
}
> 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++;
}
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();
> }
> }
>