total no of ways in which all 7 can be seated =

7! waysnow,

if rohit sits at

first seat then remaining 6 can be seated in

6! ways if rohit sits at

middle seat then remaining 6 can be seated in

6! ways if rohit sits at

last seat then remaining 6 can be seated in

6! waysno. of ways in which rohit

doesnt sits in middle or at either ends =

7! - (6! + 6! + 6!) = 7! - 6!*3 = 6!(7-3)=6!*4=

2880Hope this helps.

_________________

Live as if your were to die tomorrow. Learn as if you were to live forever - Gandhi