if-else loop code example
Example 1: if statement in c
#include <studio.h>
int main()
{
if (logic goes here)
{
CODE
}
else if (logic)
{
CODE
}
else{
CODE
}
return 0
}
Example 2: else if
if ( x > 10 )
{
cout << "x is greater than 10";
}
else
{
cout << "x is less than 10";
}