Question 851580
<pre>
Suppose the seven students are

Ann
Barbara
Carl
Doug
Edith
Jack
Jill

If it did not matter if Jack and Jill stood together,
the answer would by 7! = 5040 ways.

But since they cannot, we must subtract from that the number
of ways they could stand together.

That's either the number of permutations of these 6 "things":

Ann
Barbara
Carlhttp://www.algebra.com/tutors/linear.solver?solver_action=plug
Doug
Edith
Jack&Jill, with Jack next to Jill, Jack in front of Jill

which is 6!

or the number of permutations of these 6 "things":

Ann
Barbara
Carl
Doug
Edith
Jill&Jack, with Jill next to Jack, Jill in front of Jack

which is also 6!

Answer 7!-2×6! = 5040-2×720 = 5040-1440 = 3600 ways.

Edwin</pre>