lab assignment Chapter 6

# lab assignment Chapter 6 - Chapter 6 Problem...

• Homework Help
• soodi
• 4

This preview shows page 1 - 3 out of 4 pages.

Chapter 6. Problem 2. #include <iostream> using namespace std; bool Vowel( char letter ); int main() { char character; char letter; cout << " Enter a character to be verified: " ; cin >> character; cout << endl; letter=character; switch (letter) { case 'a' : cout << character << " is a vowel." << endl; break ; case 'e' : cout << character << " is a vowel." << endl; break ; case 'i' : cout << character << " is a vowel." << endl; break ; case 'o' : cout << character << " is a vowel." << endl; break ; case 'u' : cout << character << " is a vowel." << endl; break ; default : cout << character << " is not a vowel. " << endl; } system( "pause" ); return 0; } Chapter 6. Problem 5.
#include <iostream> #include <iomanip> using namespace std; const double PI = 3.1419; double rectangle( double l , double w ); double circle( double r ); double cylinder( double bR , double h ); int main() { double radius; double height; double length, width; int choice; cout << fixed << showpoint << setprecision(2) << endl; cout << "This program can calculate the area of a rectangle, " << "the area of a circle, or volume of a cylinder." << endl; cout << "To run the program enter: " << endl; cout << "1: To find the area of rectangle." << endl; cout << "2: To find the area of a circle."

Want to read all 4 pages?

Want to read all 4 pages?

#### You've reached the end of your free preview.

Want to read all 4 pages?

• Fall '09
• MAY
• endl, cout

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern