Question: Overview Name this program Divinci.c - This project takes a stream of text ( strings ) and formats the text into a set of lines

Overview
Name this program Divinci.c - 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 paragraph, we take 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 line. The program then uses this as the width of all output lines. We right justify each line, as this is a true mirror of a standard left-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 9 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 eht revo spmuj xof nworb kciuq ehT
Two example executions of the program are shown below. The bottom row of numbers shows you there are that many columns, and you need to generate that line of numbers as part of your output. Note that all lines are right-justified.
Examples
./a.out
Enter the width of an output line:
10
Enter your text (control-d to exit):
The quick brown fox jumps over the lazy old dog.
 Overview Name this program Divinci.c - This project takes a stream

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!