Programming Problem 6 in Chapter 6 asked you to write a program to check whether an input line is a palindrome (a word or phrase that is the same backward and forward). At that time, we needed to use the substring function to extract individual characters from a string. Because this is a cumbersome way to work with a string, we limited our definition of palindromes to just perfect palindromes—every letter and blank exactly the same in both forward and backward versions. Now that we know how to use arrays, we can expand the definition to ignore blanks, punctuation, and letter case. Thus
which is now a palindrome. Write a C++ program that reads a line of input and checks whether it is a palindrome on the basis of this less restrictive definition. Output the reversed line, with all blanks and punctuation removed, and all letters converted to lowercase along with the program’s decision.
Ref Prb:
You are burning some music CDs for a party. You’ve arranged a list of songs in the order in which you want to play them. However, you would like to maximize your use of space on the CD, which holds 80 minutes of music. To do so, you want to figure out the total time for a group of songs and see how well they fit. Write a design and a C++ program to help you accomplish this task. The data are on file songs.dat. The time is entered as seconds. For example, if a song takes 7 minutes and 42 seconds to play, the data entered for that song would be
After all the data has been read, the application should print a message indicating the time remaining on the CD.
The output should be in the form of a table with columns and headings written on a file. For example:
Note that the output converts the input from seconds to minutes and seconds. Use meaningful variable names, proper indentation, and appropriate comments. Thoroughly test the program using your own data sets.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.