Question: How do you write this code in c++? Project Overview: This project takes a stream of text (strings) and formats the text into a set
Project Overview: This project takes a stream of text (strings) and formats the text into a set of lines with a specific width. However, rather than just do the standard left-justified text that you see in this the approach used by Leonardo Di Vinci and generate a "mirror" output of the text. That is, we print the text from right-to-left rather than left-to-right. The program prompts the user for the length of an output linc. The program then uses this as the width of all ourput lines. We right justify each line, as this is a true mirror of a standard left paragraph, we take justified paragraph. We cannot do a true mirror of the text, as we do not have the ability to change the direction of our letters. We cannot generate s instead of e (and so on). So we will just print the text out backwards. As an example, consider the input: The quick brown fox jumps over the lazy old dog This text, written backwards, is .god dlo yzal aht revo spmuj xof nworb kciug ehT Two sample executions of the program are shown below. The bottom row (black numbers) is added to show you there are that many columns, you do not have to generate that line of numbers as part of your output. Note that all lines are right-justified. a.out Enter the output line length: 10 Enter your text (control-d to exit) Enter your text (control-d to exit) The quick brown fox jumps over the The quick brown fox jumps over the lazy old dog.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
