Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Vowel Program CSCI 111 Programming and Algorithms I NEW CONCEPTS: Successful completion of this lab incorporates the following new concepts. switch statement switch (

Lab

Vowel Program

CSCI 111 Programming and Algorithms I

NEW CONCEPTS: Successful completion of this lab incorporates the following new concepts.

  • switch statement

    switch ( ) { case 'x':

    statement;

    break; case 'y':

    statement; break;

    BLAH

    default: statement;

    }

  • tolower function#include

    locale loc; tolower( , loc)

    Task list:

    1. Create a source code file named lab13.cpp.

    2. Start by prompting the user for a sentence and saving it into a variable of type string.

    3. Determine the frequency of each of the 5 vowels (i.e. a, e, i, o, u) plus other unknown characters.

    4. The determination of vowels should be case-insensitive which means lower and upper-case letters are

    treated the same. It is mandatory to use the tolower function. Using the or statement can produce the same result, but 0 credit will be earned.

    locale loc;

    tolower(sentence[c],loc)) { 5. The program should also use the switch statement. Again, 0 credit will be earned without the

    implementation of the switch statement.

    6. Refer to the expected output listing below.

  • SAMPLE OUTPUT

    Please enter a sentence. CSCI 111 is fun and ENJOYABLE! Vowel statistics a: 2 e: 2 i: 2 o: 1 u: 1 unknown: 22

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

Describe the biological process of the sleepwake cycle.

Answered: 1 week ago

Question

Persuasive Speaking Organizing Patterns in Persuasive Speaking?

Answered: 1 week ago