#include <stdio.h>
#include <cs50.h>
int main(void)
{
int h;
h = get_int("h ");
while (h > 2)
{
printf ("ffff");
}
}
As any integer greater than 2 entered, there is an infinite loop (ffff printed infinitely). Could anyone please explain why so.
Reply
https://cs50.stackexchange.com/questions/41832/understanding-infinite-loop-with-while-loop[learn_press_profile]