I am trying to build a small c program that asks the gender and the age of the user. So if the gender if 'F' and age>18 the message will be "woman" otherwise display "young girl" and likewise for the gender "M".
But according to my code only the two first conditions are executed properly then when coming to "else if" condition messages are wrong

Below is the code I wrote.

Code:

```
#include <stdio.h>
#include <string.h>

char sexe;
int age;

int main()
{
    if(age>=18)
    {
        printf("\n Woman");
    }
    else
    {
        printf("\n young girl");
    }

    return 0;
}
else if(sexe='M');
{
    if(age>50)
    {
        printf("\n Old man");
    }
    else
    {
        printf("\n Young man");
    }

}
return 0;

}
}

```