Question: Store the following two arrays in the main method. int age [ ] = { 2 6 , 6 4 , 3 1 , 6

Store the following two arrays in the main method.
int age[]={26,64,31,64,69,48,65,70,35,42,48,
38,20,56,38,66,25,29,69,51,46,43,40,46,
55};
int weight[]={177,145,135,104,132,138,205,
166,135,158,136,128,120,217,133,110,173,
144,214,192,126,196,145,215,176};
Write code to compute the following:
1) Average age.
2) The average weight of those people in their
forties.
3) Highest weight.
Save the file as Topchyan_lab12.java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!