Why is there no asterisk before lowest n highest in printf of main?
Code:
main()
{
...
printf("The average monthly rainfall in Melbourne is %.2fmm,\n" , total / 12);
printf("The lowest rainfall of %.2fmm falls in %s,\n" , rainfall[lowest] , month[lowest]);
printf("The highest rainfall of %.2fmm falls in %s,\n" , rainfall[highest] , month[highest]);
printf("Press [Enter] to exit: ");
getchar();
return 0;
}
double rainStats(double rainfall[] , int * lowest , int * highest)
{
int i;
* lowest = 0;
* highest = 0;
double total = rainfall[0];
for (i = 0 ; i < MONTHS ; i++)
{
total += rainfall[i];
if(rainfall[i] < rainfall[* lowest])
* lowest = i;
if(rainfall[i] > rainfall[* highest])
* highest = i;
}
}