]

[ int max_temp(float temps_arr[]) { int max = 0; for(int k = 0;k<=4;k++) { max = temps_arr[0]; if(max>temps_arr[k]) { max = temps_arr[k]; printf("The maximum Temperature for city %d is %d\n", k+1, max); } } } And also how i integrated it into my program; for(int i = 0;i<=4;i++) { printf("Enter city %d\n", i+1); scanf("%s",&cities[i]); for(int j = 0;j<=4;j++) { printf("Enter temperature %d\n", j+1); scanf("%d", &temps[j]); max_temp(temps); } } return 0;

I'm not getting desired result so any input is appreciated!..