Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ program (complete) - the file can be anything 6. Modified Programming Exercise 5.49 (10 marks) (Count vowels and consonants, file input, nested-loops, switch statement)

C++ program (complete) - the file can be anything

image text in transcribed

6. Modified Programming Exercise 5.49 (10 marks) (Count vowels and consonants, file input, nested-loops, switch statement) Assume that letters A, E,I, O and U are the vowels. Write a program that reads strings from a text file, one line at a time, using a while-loop. You do the following operations within each loop: .Read one line from the input file and store it in a string; Count the number of vowels and consonants (using either while-loop or for-loop) in the file string The while-loop will terminate when the end-of-file is reached. After the loop is finished, the program displays the total number of vowels and consonants in the text file. A text file, named "ass4 _06_input.txt", is provided as your testing input file.]

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

Students also viewed these Databases questions