Question: I need quick help! This assignment is designed to help get you used to the Vocareum system. It will be graded, but will be assigned
I need quick help! This assignment is designed to help get you used to the Vocareum system. It will be graded, but will be assigned a very small percentage of the overall grade; it is mostly intended to get you going on using Vocareum. 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. 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 (we define small to mean size 5, medium to mean size 10, and large to mean size 20), then the program should print the argument. Note that it is possible, and valid, for there to be no command line arguments after the first command line argument. Reminder: the first entry in the array of command line arguments, at the [0] position in the array, is the name of the program. We do not look at or use that value in this assignment.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
