Capture the user input of number of footballers in variable n. Use a for() loop with variable i as the counter to capture information for each staff. In each loop, ask user to input footballer’s name into variable name, footballer’s club into variable club, number of goals into variable goals and division (1 = division one or 2 = division two) into variable division. If any other input is given, display an error message and decrease the value of counter i to recollect information for that particular loop.
p/s : i don't have any idea how to do this. Can anyone help?
The way the problem is worded... it's actually very easy to break this into individual steps. Each sentence is basically a step. Just do them one at a time.
Start with this:
Capture the user input of number of footballers in variable n.
You know how to do that, right? Let's see the code for it.
I'm not going to write the code for you. If this is an assignment for a class, you should have covered how to capture user input already. Let's see you come up with the code on your own.
Once you show me you can make the effort, I'll help you along.