0% found this document useful (0 votes)
48 views2 pages

3.1 Que No 1 Switch Statement: Lab Manual # 3

The document describes a C++ program using switch statements with 4 options: 1) finds the largest of 3 numbers, 2) determines if a number is odd or even, 3) identifies the state of water based on temperature, 4) determines a student's letter grade based on their numeric grade. Option 3 details the states as ice, water, or steam depending on if the temperature is less than 0, greater than 0 but less than 100, or greater than 100, respectively. Option 4 details the letter grades as A, B, C, or D if the numeric grade is greater than or equal to 90, 80, 70, or 60, respectively. The document prompts for the program code area.

Uploaded by

Videos4u iK
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)
48 views2 pages

3.1 Que No 1 Switch Statement: Lab Manual # 3

The document describes a C++ program using switch statements with 4 options: 1) finds the largest of 3 numbers, 2) determines if a number is odd or even, 3) identifies the state of water based on temperature, 4) determines a student's letter grade based on their numeric grade. Option 3 details the states as ice, water, or steam depending on if the temperature is less than 0, greater than 0 but less than 100, or greater than 100, respectively. Option 4 details the letter grades as A, B, C, or D if the numeric grade is greater than or equal to 90, 80, 70, or 60, respectively. The document prompts for the program code area.

Uploaded by

Videos4u iK
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

Lab Manual # 3 Switch

Statements

3.1 Que No 1 Switch statement

Write a program in C++ using switch statement that contain option as under

Enter 1--> To Find Largest Number Among Three Variables.


Enter 2--> To Find ODD or EVEN
Enter 3--> To Find Condition of Water
Enter 4--> To Find Grade Of Student

Detail of Option 3
Temperature Less than 0 = ICE
Temperature Greater than 0 & Less than 100 = Water
Temperature Greater than 100 = STEAM

Detail of option 4

grade >= 90 Grade A

grade >= 80 Grade B

grade >=70 Grade C

grade >=60 Grade D

3.1.1 Code Area

You might also like