determine the largest number using FOR loop with c++

What news from a friend ni pheewe who never gave up and always eager to learn computer programming. ok let's Companions are always eager to something that could never be possible as long as we still want to work hard to get it. ok the friends on this occasion we're trying to learn to program again make use of C + + language. and at this time we will try to determine the largest number of multiple input which make use of repetition, the opportunity this time we will try to use a FOR loop. Ok already get a cup of coffee for a friend in learning this time. if not prepare emhhh first, then so can his more lasting learning. ok ok ok ok.

This phewe no script C + + that we need to learn together and find fault or the location where ni erornya this program, so we better know how the hell Programming is and where to find kesalahnya like ok ok.

# include
# include

int main ()
{
clrscr ();
int a lot, i, number [100], the largest;
court <<"find the biggest number using a loop for" << court <<"a lot of numbers:";
cin>> a lot;

for (i = 0; i {
court <<"numbers to =" <<<":";="" cin>> numbers [i];
}

largest = numbers [0];
for (i = 1; i {
if (numbers [i]> largest) largest = numbers [i];
}

court <<"the largest number is:" < getch ();
return 0;
}


0 comments:

Twitter Delicious Facebook Digg Favorites More