# Independent Scenario: Club Results

- **Track:** Cambridge IGCSE™ Computer Science (0478 / 0984) (CAMBRIDGE IGCSE 0478)
- **Module:** Section 8: Programming Concepts & File Handling
- **Estimated Duration:** 30 minutes
- **Access:** Open Theory (All-Access for Interactive IDE &amp; Autotests)

---

## Theory & Conceptual Background

This is cumulative practice after arrays, loops and subroutines. Independently turn the requirements into an input/process/output/storage plan. Use a non-square table to avoid confusing rows with columns.

## Requirements

Three teams each play two rounds. Input their six integer scores in team order. Report each team's total in order, then the winning team's number (1,2 or 3). If totals tie, the lower team number wins. Scores may be zero or negative.

Before coding, choose your data representation and write a test for a tie. Trace one dataset on paper. After coding, explain how the program resets each total and how the winner comparison implements the tie rule.

## Paper rehearsal

Allow about 30 minutes. Keep your initial design, test plan and corrected code together. Self-review: did all six values contribute, did negative totals work, did the first team win a tie, and did each output follow the specification? Passing the automated cases is feedback, not a guarantee of full marks on a different unseen problem.

---

## Interactive Exercises & Autotest Specifications

### Exercise 1: Independent Scenario: Club results (Pseudocode, 30 XP)

**Instructions:**
Read six scores, two for each of three teams. Output each team total, then the winning team number. In a tie choose the lowest team number.

Write a complete program. Read inputs in the stated order. Output only the requested results, one per line, without input prompts. Test with your own values before submitting.


**Starter Code:**
```text
// Plan your solution, then write your program.

```

**Autotest Expectations:**
- **Different totals**: `test_case` -> Expected: `{&quot;inputs&quot;:[2,3,4,5,1,1],&quot;output&quot;:&quot;5\n9\n2\n2&quot;}`
- **Tie**: `test_case` -> Expected: `{&quot;inputs&quot;:[4,1,2,3,0,5],&quot;output&quot;:&quot;5\n5\n5\n1&quot;}`
- **Negative scores**: `test_case` -> Expected: `{&quot;inputs&quot;:[-5,-4,-1,-2,-8,-1],&quot;output&quot;:&quot;-9\n-3\n-9\n2&quot;}`

