Infinite while loops
Each of the following loops is infinite. Find the reason the loop is
infinite and correct the error so that it no longer is infinte.
count = 0;
while (count < 20)
printf("%d", count);
count = count + 2;
count = 0;
while (count < 20);
printf("%d", count++);
count = 1;
while (count = 1)
{
printf("%d", count);
count = 0;
}
count = 0;
while (count != 20)
{
printf("\nEnter 20 to quit ");
scanf("%d", count);
}
count = 1;
while ((count < 10) || (count > 0))
{
printf("\ncount = %d", count);
count++;
}