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,
.
"
krypton25 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.