There is only 2 way such a thing is possible.
(1) By default, the iPad let you write, compile and run programs in it without requiring any external device (like a iMac with XCode). That would mean it is easy to distribute such programs without going through the App Store, just like with a plain old desktop computer. I don't believe it for a second.
(2) You had jailbroken it.
Therefore, it is safe to say that by default, the iPad is not programmable.