Example code I found in the book:
[
int main {
const int size = 3;
double arr[size] = {7.8,9.0,6.3}
double largest = arr[0]
for(int i =1; i<size; i++){
if(arr[i] > largest){
largest = arr[i];
}
}
cout << largest << endl;
return 0;
}
]Now that prints out "8". How can I the print out of "arr[1]" ?
This post has been edited by jimblumberg: 17 February 2013 - 06:22 PM
Reason for edit:: Added missing code tags. Please learn to use them properly.

New Topic/Question
Reply



MultiQuote






|