CJCoding With Joseph

Membership Price

Read two integers with scanf: a price, then a membership flag (1 for member, 0 for non-member). Members get 10 off; non-members pay full price. Print the amount to pay with no trailing newline.

For input 50 1 the output is 40; for input 50 0 the output is 50.

Expected Output:

40
Topics:
If Statements
๐Ÿ“ฅ Auto-Input:
50 1\n
This input is automatically fed to your program's stdin
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.