0% found this document useful (0 votes)
3 views

switch and loop practice

Physics topic switch For long question as well as practical

Uploaded by

hmhssaleemi02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

switch and loop practice

Physics topic switch For long question as well as practical

Uploaded by

hmhssaleemi02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Write a Simple program in C++ to print Day of the Week using


switch statement .

2. Menu Display:
a. The program first displays a simple menu with four options:
i. Start New Game
ii. Load Game
iii. Options
iv. Exit
3. Write a Simple program in C++ to calculate the area of Circle,
Square, and Rectangle using switch statement.

Choose a shape to calculate its area:


1. Circle
2. Square
3. Rectangle
1
Enter the radius of the circle: 5
Area of the circle: 78.5398

Loop
1. Write a C++ program to print all numbers between a and
b (a and b inclusive) using for loops.
2. Write a program to calculate the sum of all numbers
entered.

4.Write a Program that displays the following menu of Fast Food Cafe:

1. Pizza Deal

2. Burger Deal

3. Quit the Program

If user go for pizza deal then the program further shows the following menu:

1. Excel Pizza

2. Medium Pizza

3. Small Pizza
If user go for Burger deal then the program further shows the following
menu:

1. Zinger Burger

2. Cheese Burger

User either can purchase Pizza or Burger. If user purchase more than 1 pizza
also offer him/her 1.5lt free Sprite.

You need to show the price of each item in the menu.

You might also like