subject

A. Prompt the user for a string that contains two strings separated by a comma. Examples of strings that can be accepted: Jill, Allen Jill, Allen Jill, Allen Ex: Enter input string: Jill, Allen b. Report an error if the input string does not contain a comma. Continue to prompt until a valid string is entered. Note: If the input contains a comma, then assume that the input also contains two strings. Ex: Enter input string: Jill Allen Error: No comma in string Enter input string: Jill, Allen
c. Extract the two words from the input string and remove any spaces. Store the strings in two separate variables and output the strings. Ex: Enter input string: Jill, Allen First word: Jill Second word: Allen
d. Using a loop, extend the program to handle multiple lines of input. Continue until the user enters q to quit. Ex: Enter input string: Jill, Allen First word: Jill Second word: Allen Enter input string: Golden, Monkey First word: Golden Second word: Monkey

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:30
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
question
Computers and Technology, 23.06.2019 08:30
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
question
Computers and Technology, 23.06.2019 20:40
Instruction active describing list features which statements accurately describe the features of word that are used to create lists? check all that apply. the tab key can be used to create a sublist. the enter key can be used to add an item to a list. the numbering feature allows for the use of letters in a list. the numbering feature can change the numbers to bullets in a list. the multilevel list feature provides options for different levels in a list.
Answers: 2
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
You know the right answer?
A. Prompt the user for a string that contains two strings separated by a comma. Examples of strings...
Questions
question
English, 04.04.2020 08:36
Questions on the website: 13722361