(Assuming this isn't a troll question....)
Simply give each DNS record an A record. Alternatively, CNAMES could
point to aliases of already configured subdomains. You realize in
www.whatever.com., www is a subdomain, right?
Controlling DNS records from the application level would be quite
difficult, and I don't see the benefit.
Here's a solution that might work (I don't know how to do it off the top
of my head with IIS, but it can't be difficult): use name-based virtual
hosts. Use a wildcard to resolve all subdomains to a certain host
(GoDaddy supports this feature), then the application could maybe be
programmed to respond differently depending on which subdomain a user's
browser sends in the headers; the browser should pass the subdomain it's
seeking as an environmental variable, and your application can respond
accordingly. When the application checks the environmental variable, it
can deliver a different page based on what host header is supplied by the
browser.
The disadvantage is you couldn't use SSL with name-based vhosts; you also
won't be able to server HTTP 1.0 clients very well (but then, almost
nobody is limited to HTTP 1.0 anymore; most browsers support 1.1, and many
hosting companies use name-based vhosts).
But the advantage is you save IPs and have more flexibility in what sites
to host.
http://httpd.apache.org/docs/2.2/vhosts/ - that's Apache's vhost
configuration info. It won't help with IIS, but it goes into a bit more
detail weighing the advantages and disadvantages than I just did. I know
IIS supports name-based vhosts too. I just don't remember how to do it.