โ Back to If Statements
Question 270
Membership Price
Membership Price
Read two integers withscanf: aprice, then a membership flag (1for member,0for non-member). Members get10off; non-members pay full price. Print the amount to pay with no trailing newline. For input50 1the output is40; for input50 0the output is50.
Expected Output:
40
Topics:
If Statements
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.