Comp 1671 Homework 6 Assigned October 16, 2002 Due October 22, 2002 From Chapter 6 of the book: 6cde, 7, 8 Now do: A. Write (implement) a function that takes a single integer parameter representing the year (for example, 1776, 1984, 2002) and returns a boolean that indicates whether or not that year is a leap year. B. Write (implement) a function that takes three floats and returns a float that is the minimum of the three of them. C. Write a function called is_vowel that determines whether or not a character is a vowel. D. Write a function that takes 4 floats (x1, y1, x2 and y2) that together represent two points in the plane. The function should return a float giving the straight-line distance between them. E. What does the following program do? Add comments and rename variables to make it clear. #include using namespace std; bool hattal_oszthat(int mennyi); int main() { int szam; int mutatoszam; cout << "Please type a positive integer: "; cin >> szam; if (!cin || szam < 0) { cout << "Silly, user! You did not follow directions!\n"; return 1; } for (mutatoszam=1; mutatoszam<=szam; mutatoszam++) { if (hattal_oszthat(mutatoszam)) cout << mutatoszam<< " "; } cout << endl; return 0; } bool hattal_oszthat(int ertek) { if (ertek%3 || ertek%2) return false; else return true; }