Answer the question
In order to leave comments, you need to log in
How to write a program for Tolstoy Startup Camp?
I would like to take part, for this you need to write a small program, the task:
Developer
Challenge Write a program to solve the following problem using any object-oriented language. The program must consist of a single file and contain a comment describing how to build and run. The program must be launched from the command line and take two arguments as input: the name of the input file and the name of the output file. Not only the performance and correct execution of the program will be evaluated, but also the readability of the code, efficiency and speed of work.
Task
Given a text consisting of several lines of arbitrary length. It is necessary to break it into paragraphs and justify, that is, format it as text with a width of N (20 - 120) characters, aligned to the right and left borders. The line width should be increased by adding spaces, one at a time, starting from the right edge. The end of a paragraph is a line that ends with the appropriate punctuation marks. New paragraphs must begin with a four-space red line. A paragraph of one line with a length of less than half N is a heading, it does not need to be justified.
It will be a plus if your program is able to process not only ASCII texts, but also texts encoded in UTF-8.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question