Here comes the easy and longest program asked in TCS NQT 2020.
Problem Statement
FULLY AUTOMATIC VENDING MACHINE - dispenses your cup on just press of button. A vending machine can serve range of products as follows:
Coffee
- Espresso Coffee
- Cappuccino Coffee
- Latte Coffee
Tea
- Plain Tea
- Assam Tea
- Ginger Tea
- Cardamom Tea
- Masala Tea
- Lemon Tea
- Green Tea
- Organic Darjeeling Tea
Soups
- Hot and Sour Soup
- Veg Corn Soup
- Tomato Soup
- Spicy Tomato Soup
Beverages
- Hot Chocolate
- Badam Drink
- Badam-Pista Drink
Write a program to take input for main menu & sub menu and display the name of sub menu selected in following format(Enter the first letter to select main menu):
Welcome to CCD
Enjoy your < name of sub menu >
Test Case 1
Input :
c
1
Output :
Welcome to CCD!
Enjoy your Espresso Coffee!
Test Case 2
Input :
t
9
Output :
INVALID OPTION!
Program:
Output:
Hope it helps you
0 Comments