בבקשה בC
קוד:
#include <stdio.h>
void main()
{
int maxwi,maxhi,i;
float ar[15][2],maxh=0,maxw=0;
printf("type the height and weight of 15 people\n");
for(i=0;i<15;i++)
{
scanf("%f %f",&ar[i][0],&ar[i][1]);
if(ar[i][0] > maxh)
{
maxh = ar[i][0];
maxhi = i;
}
if(ar[i][1] > maxw)
{
maxw = ar[i][1];
maxwi = i;
}
}
printf("The weight of the tallest man is %f\nThe Height of the fatest man is %f",ar[maxhi][0],ar[maxwi][1]);
}