"The floor needs to be swept."
Here's why:
* "Needs swept" is grammatically incorrect because it uses a past participle ("swept") as if it were an adjective.
* "Needs to be swept" is the correct structure because it uses the passive voice, which is necessary when the subject of the sentence (the floor) is the receiver of the action (being swept).
You could also say:
* "The floor needs sweeping." This is a slightly more informal way to express the same idea.