Thursday, July 30, 2009

I'm student, some one plz help me to developed a c program to find the maximum and minimum from a 10 numbers.

I try to developed a program in "c" programinto enter 10 numbers and find the minimum and maximum using a funtion. but it did not work. can some one help me with this, if some one can give me the program i can find out the mistake i have done.

I'm student, some one plz help me to developed a c program to find the maximum and minimum from a 10 numbers.
If you are still stuck, may be you can contact a C expert at websites like http://askexpert.info/
Reply:I don't specifically do C programming, but this kind of error is pretty generic.





First of all, check your syntax. If you physically wrote your code correctly, then the error lies with your logic.





To find the max and min, you can have the application run through the list of numbers one by one. What would you need in order to compare the numbers? When you process a new number, you can check to see if it's bigger or smaller than the current max or min, and if so, set that number as the new max or min.





This can be done with a simple loop.





Good luck!
Reply:do you go to seneca by any chance?


No comments:

Post a Comment