Question
Write a C++ program that loops through all of the command line arguments that are passed to the program, beginning with the argument after the
Write a C++ program that loops through all of the command line arguments that are passed to the program, beginning with the argument after the program name. The first command line argument must be the string small, medium or large. We define small to mean size 5, medium to mean size 10, and large to mean size 20. If the first command line argument is missing, your program should print MISSING SIZE and stop. If the first command line argument is not the string small, medium or large, then your program should print the argument followed by a space and the message NOT A VALID SIZE, then should stop. For each command line argument after the first argument, your program should determine the length of the argument. If its length is greater than or equal to the size specified by the first command line argument, then the program should print the argument
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started