pn*********@gmail.com wrote On 06/22/06 12:25,:
hey iam asking... some sort of code
You need to learn how to ask if you want an answer.
First, when replying to a Usenet message you should always
quote enough context so that someone who sees your reply
in isolation can still understand what is going on. For
an example, look at Frederick Gotham's reply to your first
message in this thread.
Second -- and this applies to all kinds of questions,
not just those asked on Usenet -- learn how to ask a definite
question. Frederick's reply was a way of demonstrating that
your question was not definite: He provided code that does
exactly what you asked, but was almost certainly not what
you wanted. Why? Is he cruel? Does he delight in pulling
the wings off butterflies? Probably not: He simply has no
way to know just what it is that you want!
You said that you wanted to start with "god is great"
and print " great is god". Presumably, you intended these
two strings to illustrate some kind of transformation that
could also be applied to other strings -- but what is the
nature of the transformation you are thinking of? Part of
it might be reversing the order of the words, but the rule
for inserting the extra space is not at all clear. Or it
might be far more complicated: Perhaps you're looking for
a full-scale grammatical analysis of the input, identifying
the subject, verb, and predicate, and then rearranging them
in a grammatical way (so "green carrots are weird" becomes
"weird are green carrots" and not "weird are carrots green").
You have given no useful information about the task you are
trying to accomplish, so no one is able to give useful advice
about how to accomplish it.
Have you run into those so-called "intelligence" tests
where you are given a few elements of a sequence and asked
what comes next?
2 4 6 8 ___?
1 2 4 8 ___?
2 3 5 7 ___?
The question you asked was the equivalent of
6 ___?
.... and you should not be surprised if the answers you receive
are unsatisfactory.
--
Er*********@sun.com