Jim bought some chocolatees and gave half of it to Ken. Ken bought some sweets and gave half of it to Jim.Jim ate 12 sweets and ken ate 18 chocolates.The ratio of Jim's sweets to chocolates became 1:7 and the ratio of Ken's sweets to chocolates became 1:4. How many sweets did ken buy?

Jim and Ken have the same number of sweets and chocolates to begin with, as each of them gave half to the other. So:

From Jim eating 12 sweets, we can conclude that S-12=7C, as the number of sweets he has after eating 12 is seven times the number of chocolates he has.
From Ken eating 18 chocolates, we can conclude that S=4(C-18) or S=4C-72.

We can substitute the equation from Ken into the Jim equation, getting 4C-72-12=7C. -84=3C. C=-28, so S=-192. Ken originally had 2S sweets, so Ken bought -384 sweets. Check to see if you have accurately written this problem down, as the answer seems suspect.

To find out how many sweets Ken bought, let's work through the information step by step.

1. Let's assume that Jim initially had "x" chocolates. Since Jim gave half of it to Ken, Ken received "x/2" chocolates.
So, after this exchange:
- Jim has (x - x/2) chocolates, which simplifies to (x/2).
- Ken has (x/2) chocolates.

2. Now, Ken buys some sweets and gives half of them to Jim. Let's assume Ken initially had "y" sweets. After giving half to Jim, Ken has (y - y/2) sweets, which simplifies to (y/2).
So, after this exchange:
- Jim has (y/2) sweets.
- Ken has (y/2 - y/4) sweets, which simplifies to (y/4).

3. Given that Jim ate 12 sweets, we can set up the equation:
Jim's sweets = (y/2 - 12)

4. Given that Ken ate 18 chocolates, we can set up the equation:
Ken's chocolates = (x/2 - 18)

5. The ratio of Jim's sweets to chocolates is given as 1:7, so we can set up the equation:
(y/2 - 12)/(x/2) = 1/7

6. Similarly, the ratio of Ken's sweets to chocolates is given as 1:4, so we can set up the equation:
(y/4)/(x/2 - 18) = 1/4

Now, we have a system of two equations with two variables. Let's solve these equations simultaneously to find the values of x and y.

First, let's simplify each equation:
Equation 1: (y - 24)/(x) = 1/7
Equation 2: (y)/(2x - 36) = 1/4

To eliminate fractions, we can cross-multiply the equations to get:
Equation 3: 7(y - 24) = x
Equation 4: 4y = 2x - 36

Now, we can substitute Equation 3 into Equation 4:
4y = 2(7(y - 24)) - 36
4y = 14y - 48 - 36
4y - 14y = -84
-10y = -84
y = (-84)/(-10)
y = 8.4

Since the number of sweets cannot be in decimal form, we can assume that Ken initially had 8 sweets.

Therefore, Ken bought 8 sweets.