Skip to content

Use what it gives back

Use what it gives back

double is written for you and returns a number. Call it with 21 and store the answer in answer.

return hands a value back to whoever called the function. That value is not printed — you catch it with =, exactly like any other result.

Log in or create account

IGCSE, A-Level & AP