cnoe said:
Let,
A = Apple
M = Mango
Given p apples, and q mangoes take here p =5, q= 6
[snip]
Let,
P = your post
R = someone reading your post
P R
Result: Reader can find no question in your post.
You're welcome.
OK this is simplem, you have 8M, 3A and their order is
given like this for you,
you have to arrange them in pairs
as MA MA MA and remaining as M M M M M;
if you reverse it again you have to go back to
original order.
Thanks.
Any more information please ask it.
We don't need more information. You do.
blargg's point is that you've stated a problem, but you haven't asked
a question. Just what is it that you want? It looks very much like
this is a homework problem, and your assignment is to write a C
program to solve it (but you haven't actually said so). If you're
asking us to write a C program for you that solves the problem, that's
not going to happen; we won't do your homework for you.
Try it yourself. Write a C program that solves the problem, or at
least try to do so. If you run into trouble, we'll be glad to help
out with any C language issues.
Incidentally, if I understand the problem correctly, part of it
appears to be insoluble. If you start with an arbitrary sequence of
As and Ms, and arrange them in pairs as you've specified, then you
lose all the information about how they were originally arranged; the
final result depends only on the number of As and Ms, not on their
order. I suspect the problem is that you haven't stated it accurately
(or perhaps I've just misunderstood).
But so far, given that you haven't said or asked anything that's
actually relevant to the C language, there's not much we can do to
help you (other than to encourage you to ask a clearer question).
--
Keith Thompson (The_Other_Keith) (e-mail address removed) <
http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"