int count_students (double GPAs[], int students, double value) { int i, count = 0; for (i = 0; i < students; i++) { if (GPAs[i] >= value) { count++; } } return count; } int bright_spots (long ridership[], int years, double &biggest_increase) { int i, up_years = 0; double increase; biggest_increase = 0; // our biggest increase so far for (i = 0; i < years - 1; i++) { // the following will cause a problem if ridership[i] is zero, // but the nature of the problem is such that it should never be. // note the order of operations and the use of 100.0 instead of 100 // (there is a danger here of getting integer division and this isn't // what is called for). increase = ((ridership[i + 1] - ridership[i]) * 100.0) / ridership[i]; if (increase > 0) { up_years++; if (increase > biggest_increase) { biggest_increase = increase; } } } return up_years; }