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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:20, kiarakagni
What is a point-in-time measurement of system performance?
Answers: 3
image
Computers and Technology, 23.06.2019 21:20, FlowerChild1229
For positive constants a and b, the force between two atoms in a molecule is given f(r) = −a r2 + b r3 , where r > 0 is the distance between the atoms. note: a and b are upper case letters. (a) find f '(r) = (b) find the critical point for f(r). r = (c) find f ''(r) = (d) find the value of r so that f ''(r) = 0.
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, noahmace
When writing a business letter, how many times can you use the same merge field in a document? once once, unless using the address block feature unlimited it will depend on the type of document you choose
Answers: 1
image
Computers and Technology, 25.06.2019 04:20, claraesson5581
Austin rare coins, inc., buys and sells rare coins, bullion, and other precious metals through eight web sites with different domain names. an unknown individual took control of austin's servers and transferred the domain names to another registrant without austin's permission. the new registrant began using the domain names to host malicious content—including hate letters to customers and fraudulent contact information—and to post customers' credit-card numbers and other private information, thereby tarnishing austin's goodwill. austin filed a suit in a federal district court against the new registrant under the anticybersquatting consumer protection act. is austin entitled to a transfer of the domain names? austin rare coins, inc., buys and sells rare coins, bullion, and other precious metals through eight web sites with different domain names
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 in other subjects:

Konu
Mathematics, 16.01.2020 01:31
Konu
Mathematics, 16.01.2020 01:31