Final answer:
The sentences are identified and rewritten, fixing the fragments and run-on sentence errors.
Step-by-step explanation:
1. He went to the store and bought a candy bar.
2. Having gone to the store to buy food for dinner.
3. When I went to the park to sit on the swings.
4. Education is the key to success. You should always try your best.
5. She went to the library to study until.