Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write a program, which receives a profession (as a string) and chooses the perfect drink for the person. The possible combinations are:
- • “Water” – for “Athlete”
- • “Coffee” – for “Businessman” or “Businesswoman”
- • “Beer” – for “SoftUni Student”
- • “Tea” – for all other professions.
- using System;
- namespace _01._Choose_a_Drink
- {
- class ChooseDrink
- {
- static void Main(string[] args)
- {
- string profession = Console.ReadLine();
- if (profession == "Athlete")
- {
- Console.WriteLine("Water");
- }
- else if (profession == "Businessman" || profession == "Businesswoman")
- {
- Console.WriteLine("Coffee");
- }
- else if (profession == "SoftUni Student")
- {
- Console.WriteLine("Beer");
- }
- else
- {
- Console.WriteLine("Tea");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment