🎯 Conditions in C

Em poucas palavras

A linguagem C executa condições com as palavras-chave if, else if e else, avaliadas com os operadores relacionais <, <=, >, >=, == e !=.


📝 Notas e Desenvolvimento

C supports several ways to execute conditions, using keywords such as if, else, and else if. See the example below:

if (x > 0) // First condition
{
	printf("Number is positive");
}
else if (x < 0) // Second condition
{
	printf("Number is negative"); // Else if the number is less than zero
}
else: // Else is executed if nothing else has occurred above.
{
	printf("Number is 0");
}

Some examples of conditional operators are:

CDescription
<less than
<=less than or equal to
>greater than
>=greater than or equal to
==equal to
!=not equal to

:: Reference: :: C If … Else Conditions (w3schools.com)


📚 Referências e Fontes

🔗 Conexões do Cofre

🌐 Referências Externas

💬 Citações Diretas