Please use building blocks of correct syntax:
main:
#include <stdio.h>
int main(void)
{
/* other code */
return 0;
}
do-while:
do
{
/* other code */
} while(count>=0);
if:
if(a>0 )
{
/* code if true */
} else
{
/* code if false */
}
for:
for(a=0;a<15;a++)
{
/* repeated code */
}
For getting input right, please read:
http://sekrit.de/webdocs/c/beginners-guide-away-from-scanf.html
How to read / parse input in C? The FAQ
When the syntax is right and the input is done correctly, then we can discuss the behaviour of your code; which I think is what you are actually asking about. Though what you are describing might already be solved/achieved once you spend some work on how to get input properly, based on the links above.