Альтернативная форма

Поток управления / Условные операторы / Операторы if/else

int getLatitude(void) {
    return rand() % 181 - 90;
}

srand(42);
int latitude = getLatitude();
//latitude от -90 до 90

//без фигурных скобок ветвь - ровно одна инструкция
const char *location = "";
if (latitude == 0)
    location = "Equator";
else if (latitude == 90)
    location = "north Pole";
else if (latitude == -90)
    location = "south Pole";
else
    location = "not at the Equator or Pole";

printf("latitude is %d\n", latitude);
printf("location is %s\n", location);