Well if I'm reading this correctly, you did fdisk /dev/disk0 which formatted the entire disk, not /dev/disk0s# where # is the partition you wanted to format. If you still have Mac OS and your Windows partition on the Mac, you may just need to boot into the recovery partition and click repair on the disk, it will find the Windows partition and re-write the MBR.
If you can't boot either, then you'll need to reinstall Mac OS, then redo your bootcamp. Lesson learned, but it is never a good idea to adjust your partitions while using bootcamp.
It has a lot of the same suggestions that I would have for you now. What has essentially happened is you zapped the Windows MBR (boot partition), this happens when you move partitions around. Basically your Macbook is expecting a partition called "Microsoft Basic Data" at the location of Disk0s5 starting at sector 684,000,000 and ending roughly at
976,700,000. Since you have resized a partition, it might think that disk0s5 starts at say 450,000,000 which is definitely unused space as we know it. You have to recreate a boot partition and tell the OS to point to the original starting position of the disk which was the 684M number. The easiest way to do this is to insert your Windows disk and have it repair Windows. The more difficult method is to use Windows BCD to semi-manually correct the issue.