I've seen a few posts from you now and I get the idea that you don't know that you're writing non-standard code. The program above will run perfectly fine on TurboC, but on any other compiler from the last five-ten years it won't compile. It's time to update to something from this millennium, like Visual Studio 2010 Express, or Code::Blocks.
Also, we don't give away free homework to people who show no effort. It's in the rules. We encourage people to help others, but you can if you hand out complete codes, the poster will just copy-paste it and turn it in without knowing how the program works, why it should be written this way or how to make it themselves. The next assignment will be of a higher level and since the poster didn't learn anything they'll be back for more free homework.
Also: having your email and phonenumber in you signature on a public forum will result in *a lot* of spam. You should think about removing them :icon_wink:
Hi Nick Evan,
Ya some thing is true in your post is that I write code which perfectly work and compile on TurboC, region behind that is I use TurboC only , although I have Visual Studio 2005 but I don't know how to compile and write c or c++ coding on that, If possible please help me.I got the -ve marks for that also.