0

MACHINE PROBLEM NUMBER 3
ROTATING SENTENCES
Input File: rotate.txt
In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees
clockwise. So instead of displaying the input sentences from left to right and top to
bottom, your program will display them from top to bottom and right to left.
INPUT / OUTPUT
As input to your program, you will be given a maximum of 15 sentences, each not
exceeding 100 characters long. Legal characters include: newline, space, any
punctuation characters, digits, and lower case or upper case English letters. The input
file starts with an integer indicating the number of lines that the input file contains.
The output of the program should have the last sentence printed out vertically in the
leftmost column; the first sentence of the input would subsequently end up at the
rightmost column.
Sample Input (rotate.txt)
2
Rene Decartes once said,
"I think, therefore I am."
Sample Output
"R
Ie
n
te
h
iD
ne
kc
,a
r
tt
he
es
r
eo
fn
oc
re
e
s
Ia
i
ad
m,
.
"

3
Contributors
2
Replies
12
Views
2 Years
Discussion Span
Last Post by richieking
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.