One teacher expected to teach writing yesterday, but she ended up leading her class in a hip-wiggling dance across a stage. Another teacher, who had planned a lesson in civics, gave one instead on how to buy a used car.

"Today," said English and civics teacher Hilbert Wilkinson, "you do whatever you can do, whatever works."

Wilkinson was one of many teachers from Fairfax County's Lanier Intermediate School who changed his lesson plans yesterday after a natural gas leak from the school's furnace forced the closing of the school on Bevan Drive in Fairfax City.

Most of the school's 700 eighth and ninth graders were just stepping off their buses when school officials ordered them transported to Fairfax High School, a five-minute drive away on Rte. 50 west of Fairfax Circle.

The sudden influx of 700 12- and 13-year-olds to a different school might have brought chaos to the hallways of some schools. But Fairfax High, which was built for 2,000 students and has only 1,500 enrolled now, accommodated the unexpected guests with little disruption to its regular classes.

Many of the Lanier classes were held in the auditorium, the library and the gymnasium at Fairfax High. But about six Fairfax teachers agreed to double up, freeing three classrooms for their Lanier colleagues.

In the auditorium, Wilkinson paced awkwardly in the aisle before three rows of students, their eyes fixed on the stage as if they expected a show. Using a work sheet he had in his car when he drove to Fairfax High, the civics teacher gave a quick lesson in math and how to outwit a used car salesman.

"According to the price charts, does the 1976 T-Bird appear to be a good buy? Why?" he asked.

Several rows up, tucked in a corner of the auditorium, Maureen Culhane, who teaches remedial reading and writing, was running out of ideas to keep her 10 restless students entertained. "We're going to have a half hour of jazz before lunch," she announced, and took her troupe on stage for some trunk twisting.

In a separate section of the auditorium, Carol Fay, an English teacher, found herself with 15 civics students. She did not try her hand at the subject.

"No, I've been getting them in touch with their emotions," she said. The result was 15 essays on the school-switching adventure.

Some students, like James Brahaney, 12, found inspiration for a mini-drama in the morning's events. "The bus came to a screeching halt like a bird that has been shot down," he wrote of his arrival at Lanier. "The lights and sounds thrashed around in my head . . . My emotions were like a whirlpool."

Others had more mundane thoughts when they learned they would be evacuated to Fairfax High. Said Ladera Shanklan, 13, with a smile: "I wanted to see some seniors."

Although most teachers had to abandon their teaching plans, Joanne Stevenson, a history teacher, gave the test she had drawn up the night before. Appropriate to the circumstances, the essay she had scheduled for her students was: "How would you have solved the Indians and the settlers problem yourself?"

By 1:30 p.m., after a quick lunch in the cafeteria, Lanier students were on their way back to their school. Washington Gas officials said the faulty valve on the furnace was repaired by mid-morning, and the gas vapors, which were concentrated in the boiler room and cafeteria, had dissipated.

For Jeremy Carter, an eighth grader at Lanier, the morning "was kind of like skipping school without getting in trouble for it . . . . Or like having fun without paying the price."