/* -CSCI 152 Spring 2015 Test 1: C Programming Language -Duration: 50 minutes -Open Notes -Allowed to use computers, calculator -NO CELL PHONES -Send completed program to yanako@cs.widener.edu Choose Your Option Option 1 (100 points) Write the following program: a) (35 points): Write a function int countNegative ( ) that reads 10 integers and finds and RETURNS the number of negative integers. If there are no negative integers, function returns 0. b) (30 points): Write a function double aveLast () that reads a sequence of positive integers. First negative integer will terminate the input. The function finds and RETURNS the average of ALL LAST DIGITS. If there are no positive inputs in the input the function returns -1.0. c) (10 points): Write a function int countSeven(int n) that counts the number of digits that are equal 7 in the parameter n. If there are no digits 7 in the parameter n, function returns 0. For example if n = 756817 the function returns 2, and if n = 123 the function returns 0. d) (25 points): Write main that reads one integers and performs the following. If the integer is 1, program calls function countNegative to perform its task, if the integer is 2, program calls function aveLast and performs its task, and if the choice is not 1 and not 2 program reads one positive integer and calls function countSeven to perform its task. Option 2(100 points) Write a function int score(int num_judges) that has one parameter - number of judges. The function reads the score for each judge and finds the final score in the song competition for ONE song. Scoring rules: Each judge submit the score for the song. Assume that the score is an integer, but there is no limit. Could be positive as well as negative, and could be zero. To calculate the final score: the highest score is dropped, and the minimal score is squared and then the average is calculated. Write a program that reads a number of songs in the competition, and the number of judges in the competition. Then the program reads scores for each song, finds the final score for each song, and finds the winner - the song with the maximal score. (Bonus 1: 5 points) Your program must keep track of the order of the songs and must output the numeric order of the winner song and its score. Say if 5 songs participated and the final scores for each song are: song 1: 20 song 2: 15 song 3: 17 song 4: 90 song 5: 89 Your program must output: song 4 wins the contest with score 90 */