Word mangle mini

Description

Discuss (11 comments)
The purpose of this puzzle is to mangle words. Your program will take an input file that contains a one line sentence. It will output two lines. The first line is the sentence in which words order has been reversed. The second line is the sentence in which the orders of the words is unchanged but the order of letter is reversed. The score obtained by your program will be proportional to how little characters it uses (e.g. compact code has scored higher).

Input Specifications

Your program must take a single command line argument; the name of a file.
The input file contains exactly one line, the line being the sentence to process. For example:
Hello world

Output Specifications

The output result should printed on the standard output. The first line is the sentence in which words order has been reversed. The second line is the sentence in which the orders of the words is unchanged but the order of letter is reversed. So for the previous example, the output should be:
world Hello
olleH dlrow

Scoring

The score is proportional to the size of you program when spaces, tabs and newlines have been removed. The more compact your program, the higher your score. If your program uses more than 400 chars, it will score 0 points.
© CoderCharts - All Rights Reserved
Type Puzzle Pass 1262 Fail 151
Scoring Language Level Easy Points 100
Tags ordering, string manipulation

Source code editor

Unit Tests

Name CPU Unit Memory Unit

Around 10000 words

1s
100 MB

Confirm that you want to switch languages
Your current edits will be lost.

Confirm that you wish to load a previous submission
Your current edits will be lost.