Problem 1 (25 points) Write a program to read in 100 numbers and, after you have read them all in, print out all the positive numbers you read in. int main() { int A[100]; int i; for (i=0; i<100; i++) { cout << "Please give me a number: "; cin >> A[i]; } cout << "Here are all the positive numbers read in\n"; for (i=0; i<100; i++) { if (A[i] > 0) cout << A[i] << endl; } return 0; } ------------------------------------------------------------------------------ Problem 2 (25 points): A. Write a function, called find, which takes two strings as parameters. The function will return true if the first character of the first string appears somewhere in the second string. Otherwise it will return false. bool find(char s[], char t[]) { int i; for (i=0; t[i] != '\0'; i++) { if (s[0] == t[i]) return true; } return false; } B. Using the function from part A, write a program that reads in a word and prints "yes" if that word begins with a vowel (a,e,i,o,u). Otherwise it prints "no". int main() { char word[20]; if (find(word,"aeiou")) cout << "yes"; else cout << "no"; } ------------------------------------------------------------------------------ Problem 3 (25 points): Write a function, called concat, which takes two input streams and an output stream as parameters. Assume all the streams are already associated with a file that has been opened. The two input files contain only integers. The function should make the output file contain all the integers in the first input file, followed by all the integers in the second input file. void concat(ifstream &in1, ifstream &in2, ofstream &out) { int num; in1 >> num while (!in1.eof()) { out << num; in1 >> num; } in2 >> num while (!in2.eof()) { out << num; in2 >> num; } } ------------------------------------------------------------------------------ Problem 4 (25 points): A. Write a class called person, which contains a data field for a first name, a last name, and the year the person was born. Also include function prototypes, if required, from other parts of this question. class person { private: char fname[20], lname[20]; int year_born; public: int age(int current_year); }; B. Write a member function, called age, for the class person. This function takes the current year as parameter and returns the age of the person at the end of the year. int person::age(int current_year) { return current_year - year_born; } C. Write a non-member function, called oldest, which takes two persons and the current year as input. The function will return the oldest person at the end of the year. (If they are the same age, return either one) person oldest(person p1, person p2, int current_year) { if (p1.age(current_year) > p2.age(current_year)) return p1; else return p2; } ------------------------------------------------------------------------------