if statement in c
snippet in c

syntax of if stmt

user7632

if (condition)
{
     //Block of C statements here
     //These statements will only execute if the condition is true
}

c if else

user4538

if (<condition>) {
	<code>
} else if (<condition>) {
	<code>
} else {
	<code>
}

/* example */
int money = 50;
if (money < 15) {
	go_home();
} else if (money >= 600) {
	buy_all();
} else {
	buy_tickets(money / 15);
}

/* You can chain together as many else ifs as you want. But if there are
too many it will make the code hard to understand. In that case I would 
recommend trying other solutions. */

if statement in c

user7209

#include <studio.h>
int main()
{
  if (logic goes here)
  {
    CODE
  }
  else if (logic)
  {
    CODE
  }
  else{
    CODE
  }
  return 0
}

c check if char is an operator

user8257

char o = '+';	//Or some other character

if (o == '%' || o == '/' || o == '*' || o == '+' || o == '-') {
	//Do something
    //...
}

c#if

user3959

if(number > 10)
        Console.WriteLine("test1");
        else
        if(number < 0)
            Console.WriteLine("test2");