Search Results

Showing results 1 to 2 of 2
Search took 0.02 seconds.
Search: Posts Made By: venomlash ; Forum: C++ and child forums
Forum: C++ Jan 7th, 2008
Replies: 3
Solved: max and min
Views: 2,805
Posted By venomlash
Writing an array-sorting algorithm has been the bane of intro-C++ courses since the language was invented, I think. Being a hobbyist, I try to avoid having to sort. If you just need the max and min,...
Forum: C++ Jan 7th, 2008
Replies: 3
Solved: max and min
Views: 2,805
Posted By venomlash
What I would do is this instead of the "read" loop:

int tmax, tmin;

tmax=temp[0];
tmin=temp[0];

for(int i=0; i<31; i++){
if(temp[i]>tmax){
tmax=temp[i];
Showing results 1 to 2 of 2

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC