lab assignment Chapter 6 - Chapter 6 Problem...

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.
Image of page 1
#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."
Image of page 2

Want to read all 4 pages?

Image of page 3

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

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern