005-002-007
If-Else Statement: Membership Status
Easy
Problem Description
If-Else Statement: Membership Status
Learning Objective: Make binary choice with if-else statement
In this problem, you will create a program that reads an integer purchase count, uses an if-else statement to determine whether the customer qualifies as a member (10 or more purchases), and displays either "Member" or "Regular customer" to standard output.
Create a program that inputs a purchase count and displays "Member" for 10 or more purchases, or "Regular customer" for fewer than 10. Use an if-else statement to always display exactly one of the two results.
Input
Line 1: Purchase count (integer)
Output
For 10+:
Purchase count: [count] times
Member
For under 10:
Purchase count: [count] times
Regular customer
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up