Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that processes every command line argument, excluding the program name. Your program may operate in several modes: Reverse mode: when enabled,

image text in transcribed

Write a C++ program that processes every command line argument, excluding the program name. Your program may operate in several modes: "Reverse" mode: when enabled, the program reverses the order of the letters in an argument "Upper" mode: when enabled, the program converts all lowercase letters in the argument to uppercase letters "NoVower mode: when enabled, the program skips vowels (a, e, i, o, u, A, E, I, O, U) . . The program starts with all modes disabled. As each argument is processed, the program determines the length of each argument. Based on the length, it may toggle the mode settings ("toggle" means if the mode is disabled, enable it, and if the mode is enabled, disable it) Toggling is performed according to the following rules: 1. If the length of the argument is evenly divisible by 2, toggle "Reverse" mode 2. If the length of the argument is evenly divisible by 3, toggle "Upper" mode 3. If the length of the argument is evenly divisible by 5, toggle "NoVowel" mode ok After determining the length of an argument and processing any mode toggling, the program must apply any enabled modes to the argument, print the argument out on a line by itself, then proceed to the next argument. Note that it is possible, and valid, for there to be no command line arguments after the program name

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_2

Step: 3

blur-text-image_3

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Does it exceed two pages in length?

Answered: 1 week ago

Question

Does it avoid typos and grammatical errors?

Answered: 1 week ago