samedi 25 avril 2015

C: Reading multiple areas into an array and finding the largest value


I'm attempting to find the largest value in an array. I'm given a set of areas (the input), which for now is:

4.5
19.59
1.92

These areas need to be read into an array using scanf and then from there I need to find the largest value (area) in that array. It should also be known that there can only be maximum of 100 areas that can be read into the array. So later on I may need to read in 5 or 20 or 99 etc... into the array.

If anybody could give me a hand it'd be much appreciated, I'm new to programming and don't really know where to begin.


Aucun commentaire:

Enregistrer un commentaire