Is there a way to develop an iPhone app on a windows machine?
I was thinking there should be a way using phonegap and the new cloud building https://build.phonegap.c
Windows users can develop using Phonegap Build and test on an emulator (Blackberry/Android/WinPhone7) or an Android device (point it to the Phonegap QR code). Once you are confident it works, pay $25 to register as an Android developer, and upload your app to the Google Play store. It is very easy. The certificate you need is built using a command line tool you get free with Java.
Use this experience to hone your app, and gain wisdom about the process of publishing in general. Then, when you are truly ready, you can then pay the larger fee and undertake the more complicated process: Apple.
Register as an iOS developer for $99, use the free Mobundler service to create a certificate (since you don't have a Mac, and doing it on Windows is HORRIBLY complex). Then you can then test on your (or a friend's) iPhone/iPad/iPod touch. You just tell Apple the device ids of the devices you want to test on, and send the person to your Phonegap Build page with the QR code. (Or you might be able to download the file from Phonegap and place it in the iTunes app folder to sync to a device?)
When you're happy it works on iPhone properly, you need to visit a Mac-owning friend for a few hours, and use the 'Application Loader' software to send the app to Apple for publication in the App Store. Filling in the forms is a bit more complex than for Google.
Doing things in that order saves you from spending money until you really need to, and you take the easy steps first to familiarise yourself with all the concepts.
To build your app file for iOS (ipa) for free use the Sencha Touch build tool
And then to deploy your app to a device without the Apple App Store use iTunes and sync your app to it.
Find out more
Distributing your app without paying the $99 developer license might be more tricky because you need to generate a signed ad hoc or app store distribution profile. The ad hoc profile let's you send your app to random people (up to 100) and the app store profile is for the rest of the world.
Don't lose heart if this gets confusing - it is! But it can be done. :-)
You actually must have a mac and xcode. What you choose to do with them after is up to you (to some degree, apple MAY reject a completely empty xcode project). You could, alternatively get a enterprise license (expensive I think) and then distribute iOS apps on your own without the App Store.
I am assuming that path won't happen. I know that at the end you NEED a mac to publish to the app store. You could however develop using .net and mono: http://www.mono-project.com/Main_Page
For a time apple had banned apps made in both flash and mono from being cross compiled, but I am fairly certain it is ok now. The only problem is you still need a mac. I've heard mixed reviews on whether a hackintosh is acceptable. It sounds like you MAY get through. I hear you need at least snow leopard, but that bad driver support will make you miserable for 8 hours a day: http://news.ycombinator.com/item?id=2600742
About your question for getting around the $99 bucks well I remember being able to deploy for the emulator. I was not able to deploy to my iOS device (I believe), but I had other issues. They were all some how magically resolved with a few software upgrades and getting the right keys set up and paying that $99 dollars.
If you're really only looking for an environment to build-and-test your hello world app, why not try PhoneGap Build? They build your app online and you can download and install it via iTunes (or at least that's my understanding) from that point.