Hi all
generally I understand what is while loop and conditional statement (if else ). but I am confused on when do we use while loop and conditional statement in c programming.
if the condition is true loop will run infinite and condition is false loop will never run
what is use of this type of structure
generally I understand what is while loop and conditional statement (if else ). but I am confused on when do we use while loop and conditional statement in c programming.
C:
while (condition)
{
statements;
}
C:
if (/* condition goes here */)
{
/* if the condition is true, this code will execute */
}
else {
/* if the condition is false, this code will execute */
}
what is use of this type of structure
C:
do nothing
while (condition1)
{
}
while (condition2)
{
}