mike longs

Greenhorn
+ Follow
since Mar 07, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mike longs

ok so im pretty sure i figured it out for the min. now i am working on the max and ihave this



i can get it to output the 98 as the max, but if i change indexHighTemp = i , it outputs an 11 instead of a 5. im not sure why my loop is running that many times
and both of these min and max are supposed to be set in one program with indexHighTemp and indexLowTemp as 2 seperate methods and i am having a problem setting the methods
11 years ago
ok so for the lowest temp in the array is 3 and i keep only outputting the "3" but i am supposed to return the "index of the lowest temp in the array" so it seems to me it would be at [0][1]. or say that it was the six instead of the "3" it would be [1][1]. and im not sure when the index would output what kind of format it would return in
11 years ago
yea your right but with my updated code


it works fine im just having a problem outputting the index instead of the actual value, i can do this on a one dime array but the 2 dime seems to throw me off
11 years ago
it would only run one time... thats why i was only getting the number in the first index



and that is able to output any number that is the lowest... but i am still having trouble getting the index to output instead of the actual value
11 years ago
well i is set to 1, and temp is an array so im not exactly sure what temp.length would even be besides and array thats 11 rows and 1 column( if you count 0 )
11 years ago
would it be the fact that i am looking if i is larger than temp.length when it should be looking for if i is larger than one of indexs in the array ?
11 years ago
i need to output the index for the lowest value and now all i am able to output is [0][1] im not sure why
11 years ago