Cafe Menu-Computer Programming-Lab Assignment, Exercises of Computer Programming

Kusum Megana assigned this task in lab of Introduction to Computer Programming course at Biju Patnaik University of Technology, Rourkela. It includes: Café, Menu, Program, Appropriate, Conversion, Switch, If, Else, Input, Information, Money, Exchange, Program

Typology: Exercises

2011/2012

Uploaded on 07/13/2012

ekbal
ekbal 🇮🇳

3.3

(4)

46 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lab Work (17-10-2011)
Q1.
Write a Café Menu Program. First screen shows today’s menu. Items can be ordered by pressing
their respective serial number. User can check out on pressing the last option. Prices are
displayed in Rupees. But if user likes to pay in Dollars than appropriate conversion should be
made [Assume 1$ = 80 Rs].
Use Switch or if else (whatever you like) statement for selecting options. Use setw() function
from <iomanip> header file. Take input from user at ? mark sign. Show user selected item
information at # sign.
************************************************************************
Café
************************************************************************
Today Recipes [Select Any]
1. Burger 35 Rs
2. Sandwich 30 Rs
3. Samosa 8 Rs
4. Cold Drink 18 Rs
5. CheckOut
------------------------------------------------------------------------------------------------------------
Place Your Order [1-4] or Press [5] to Exit: ?
You Order #
Will You Like to Pay in Rupees or Dollars? Press [R or $]: ?
Thanks for Buying. Your bill is $0.43
docsity.com
pf2

Partial preview of the text

Download Cafe Menu-Computer Programming-Lab Assignment and more Exercises Computer Programming in PDF only on Docsity!

Lab Work (17-10-2011)

Q1.

Write a Café Menu Program. First screen shows today’s menu. Items can be ordered by pressing their respective serial number. User can check out on pressing the last option. Prices are displayed in Rupees. But if user likes to pay in Dollars than appropriate conversion should be made [Assume 1$ = 80 Rs].

Use Switch or if else (whatever you like) statement for selecting options. Use setw() function from header file. Take input from user at? mark sign. Show user selected item information at # sign.


Café


Today Recipes [Select Any]

  1. Burger 35 Rs
  2. Sandwich 30 Rs
  3. Samosa 8 Rs
  4. Cold Drink 18 Rs
  5. CheckOut

Place Your Order [1-4] or Press [5] to Exit:? You Order # Will You Like to Pay in Rupees or Dollars? Press [R or $]:? Thanks for Buying. Your bill is $0.

docsity.com

Q2.

Write a Money Exchange Program. First screen shows available currencies. Customer select possessing money and currency type by pressing their respective serial number. User can exit on pressing the last option. [Assume 1$ = 80 Rs, 1 Euro = 120 Rs, 1 Riyaal = 22 Rs].

Use Switch or if else (what ever you like) statement for selecting options. Take input from user at? mark sign. {In below example user has selected 4 first, then entered 160 And then selected 1}


Money Exchange


Welcome: What Currency you posses [Select Any]?

  1. American Dollar
  2. Euro
  3. Riyaal
  4. Rupee
  5. Exit

Please select you option [1-5]:? How much money you want to exchange:? In which currency you like to exchange [1-4]:? Thanks! Money Exchanged : From Rupees to Dollar [ 160 Rs = 2 Dollar]

docsity.com