P
P
Petrusha Ukropov2014-01-16 16:44:30
Startups
Petrusha Ukropov, 2014-01-16 16:44:30

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.

I only know php and javascript. Applications are accepted until February 2, i.е. I have 2 weeks to superficially master some suitable language and write a program. I'm thinking of choosing Python for this, because. dealt with him, and he has a low threshold of entry.
Can you recommend Russian-language sites with up-to-date code examples?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Vasilchuk, 2014-01-16
@artishok

php and javascript are great for this task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question