Write a C program which prompts the user for the name of the brand of a phone they would like to purchase. Your program should store the user-entered name in a variable named brand. You should instruct the user to enter a single letter to match each brand ('S' for 'Samsung', 'A' for 'Apple', etc.) and output the amount to be charged based off this table: Brand Samsung Apple Motorola Google LG HTC or Nokia Price $500 $450 $400 $375 $350 $200 For instance, if the user enters "Samsung" as their choice, your program should then display to the user: "You have chosen to purchase a Samsung phone, you will be charged $500". Your program should make sure to validate the input data; if the user enters anything other than the brand names, you should display a message telling them that invalid data has been entered.
Write a C program which prompts the user for the name of the brand of a phone they would like to purchase. Your program should store the user-entered name in a variable named brand. You should instruct the user to enter a single letter to match each brand ('S' for 'Samsung', 'A' for 'Apple', etc.) and output the amount to be charged based off this table: Brand Samsung Apple Motorola Google LG HTC or Nokia Price $500 $450 $400 $375 $350 $200 For instance, if the user enters "Samsung" as their choice, your program should then display to the user: "You have chosen to purchase a Samsung phone, you will be charged $500". Your program should make sure to validate the input data; if the user enters anything other than the brand names, you should display a message telling them that invalid data has been entered.
Chapter2: Using Data
Section: Chapter Questions
Problem 7E: Write a C# program named ProjectedRaises that includes a named constant representing next years...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,