cmpe150spring2007mid2A

# 1 3 2 1 1 8 3 3 1 1 1 9 1 1 1 2 2 10 2 1 1 4 1 goal

This preview shows page 2. Sign up to view the full content.

1 3 2 1 1 0 8 3 3 1 1 0 1 9 1 1 1 0 2 2 10 2 1 1 0 4 1 (Goal statistics are the values of the first 10 weeks of Turkish Super League 2006-2007) - Be very careful about the input and output format. Input and outputs must be in the given format. First enterance will be initial and the second enterance will be the last week number. ( Teams are alphabetically sorted in the output. ) HINT: For printing a float value with four digits of precision, you have to use %.3f . Ex: float a=3.12345; printf(“%.3f”,a); output is: 3.123 Input: 1:5 Output: BJK:0.60 FB:2.00 GS:0.80 Input: 3:7 Output: BJK:0.60 FB:0.60 GS:-0.20 Question 4 (25 points): Write a program that gets several characters that are composed of numbers and letters, then writes down the sum of the numbers and the letters in the array. The number of the characters are given prior to the array. If there are n consecutive numbers between two letters then the number is assumed to be a n-digit number (ex: T800A, number is 800). Also, the letters will be written down in the order as they appear in the input array. Lastly, any capital letters will be converted into non-capital letters. (NOTE: The numbers will ALWAYS be given as either positive integer values or zero. Use dynamic allocation for the input array) Input: 7 001Ozz4 Output: 5 ozz Input: 21 009L0e20On181id70a20S Output: 300 leonidas Input: 7 LI38F4e Output: 42 life
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern