Please give some hints to solve the following program
Read roll number and height of ten students and store it in an array as the first column containing the roll number and the second column containing the corresponding height. Display the rollnumber and height of the tallest student.
I tried this program and I can only display height of the tallest student.
How can I display roll number with the corresponding height.
Please help.....
In all fairness jsmith, he might not have got far enough to use structures... like me :(
I would use a loop to get the 10 user inputs of height and roll number and put them in a 2d array. Then use another loop to cycle through the height column to find the highest value and then display it with the corresponding roll number element.
SJK, you said that you tried the program and that the output was not what you wanted. Please post your code. The problem could be something as simple as a typo. On the other hand, it could also be a major conceptual error.