# If Statements

## If-statement syntax

```fsharp
if <expr> {
    <if statement body>
}
elif <expr> {
    <else if statement body>
}
else {
    <else statement body>
}
```

## Working Example

{% tabs %}
{% tab title="Gauntlet" %}
```fsharp
package main

import "fmt" as fmt


fun main(): Unit {
  let isInRelationship = false
  let isProgrammer = true
  if isProgrammer && !isInRelationship {
    fmt.println("Makes sense")
  }
  elif !isProgrammer && isInRelationship {
    fmt.println("Makes sense")
  }
  elif !isProgrammer && !isInRelationship {
    fmt.println("It's ok, it won't be hard for you to find a relationship")
  }
  else {
    fmt.println("Stop lying")
  }
}
```
{% endtab %}

{% tab title="Transpiled" %}
```go
package main

import fmt "fmt"

func main() {
	isInRelationship := false
	isProgrammer := true
	if isProgrammer && !isInRelationship {
		fmt.Println("Makes sense")
	} else if !isProgrammer && isInRelationship {
		fmt.Println("Makes sense")
	} else if !isProgrammer && !isInRelationship {
		fmt.Println("It's ok, it won't be hard for you to find a relationship")
	} else {
		fmt.Println("Stop lying")
	}
	// Eliminates any 'unused variable' errors
	_, _ = isInRelationship, isProgrammer

}

```
{% endtab %}

{% tab title="Output" %}
```
Makes sense
```
{% endtab %}
{% endtabs %}
