Now lets look at it closer ( btw u use code tags like this [ code ] to close it [ /code ] - of course without the spaces between [ and / and [ and c ///hope that makes sense)
First of all never use void main use
int main and return 0 at end of main
Do not use clrscr see FAQ why it is a bad thing to use, there are more portable ways.+ i dont see any need of using that function here.
Now look at this piece of code
when u compile everything is still oke but when u run it you should get pretty strange outputs...
HINT: i didnt define something, in other words there is something undefined in your code which causes all your poblems...
Try and see if you can solve it now....