if you have the Restore CD for the iMac or a copy of the System 9 or OS X installation disks, you can format it from those.
Install the HD, insert the CD and power it up. It should start from the CD and allow you to use the Disk Utilities program that is on the CD.
You did not give any details as to what version of iMac this is or it's age.
Check at work to see if anyone has the original disks for this thing.
Here is the problem. I got a iMac G3 from work (from recycling), but there's no HDD in it. I have a 80GB spare HDD formatted for PC and I'd like to format it for the Mac. Any program I can use on the PC to format it for the Mac?
Thanks for your help.