1#include <studio.h>
2int main()
3{
4 if (logic goes here)
5 {
6 CODE
7 }
8 else if (logic)
9 {
10 CODE
11 }
12 else{
13 CODE
14 }
15 return 0
16}
1if (<condition>) {
2 <code>
3} else if (<condition>) {
4 <code>
5} else {
6 <code>
7}
8
9/* example */
10int money = 50;
11if (money < 15) {
12 go_home();
13} else if (money >= 600) {
14 buy_all();
15} else {
16 buy_tickets(money / 15);
17}
18
19/* You can chain together as many else ifs as you want. But if there are
20too many it will make the code hard to understand. In that case I would
21recommend trying other solutions. */