Mathematical Processes and Arithmetic Computations-Computer Programming Basics-Lab Assignment, Exercises of Computer Engineering and Programming

This is lab assignment for Computer Programming course by Anushka Banton at Biju Patnaik University of Technology, Rourkela. It includes: Program, Character, Options, Area, Items, Ordered, Price, Display, Money, Exhange, Currencies

Typology: Exercises

2011/2012

Uploaded on 07/12/2012

vishv
vishv 🇮🇳

4.4

(8)

32 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
LAB TASK (12-03-2012)
Q1.
Write a program which takes a character option from the
user if the user selects ‘C/c’ then compute area of the
circle, if ‘L/l’ then area of the cylinder, if ‘S/s’ then area
of the square, if ‘R/r’ then area of the rectangle and if
‘P/p’ then area of the parallelogram display the results on
the screen. (Refer File Shapes Formulae.docx for yours
assistance)
Q2.
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 if else statement for selecting options.
************************************************************************
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
Q3.
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].
Docsity.com
pf2

Partial preview of the text

Download Mathematical Processes and Arithmetic Computations-Computer Programming Basics-Lab Assignment and more Exercises Computer Engineering and Programming in PDF only on Docsity!

LAB TASK (12-03-2012)

Q1.

Write a program which takes a character option from the

user if the user selects ‘C/c’ then compute area of the

circle, if ‘L/l’ then area of the cylinder, if ‘S/s’ then area

of the square, if ‘R/r’ then area of the rectangle and if

‘P/p’ then area of the parallelogram display the results on

the screen. (Refer File Shapes Formulae.docx for yours

assistance)

Q2.

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 if else statement for selecting options.


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.

Q3.

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].

Docsity.com

Use if else statement for selecting options.


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