Question
Read ten names first and last from a separate file that you will type as a text file in your program called Names.txt. This can
Read ten names first and last from a separate file that you will type as a text file in your program called Names.txt. This can be your starting line up for your favorite baseball team including pitcher for the American League (10 names) or just 9 names if your team is on the National League. You will take in each name. You will place the names on an array called team. You will sort the array. You will send the original list of your starting lineup as inputted as well as the new sorted list in alphabetical order to a separate file called SentNames.txt
Write a program that reads a file containing the text below. Read each line and send it to the output file. Here is the file for input:
Mary had a little lamb
Whose fleece was white as snow.
And everywhere that Mary went,
The lamb was sure to go!
FOR EXTRA CREDITas the file reads in the line it reverses it and sends the new output to another file. The new output would be:
The lamb was sure to go!
And everywhere that Mary went,
Whose fleece was white as snow.
Mary had a little lamb
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