int flag = 0;
int price = 0;
while (flag==0)
{
printf(\"\\nEnter Product price: \");
scanf(\"%d\",&price);
if (price==0)
printf(\"input not
After the first number, a '\n' will be in the input buffer (the return you pressed to input the number), so in the second iteration the scanf call will fail (becouse \n isn't a number), scanf will not remove that \n from the buffer, so in the next iteration it will fail again and so on.
You can fix that by reading the '\n' with a getchar() call after scanf.