i code in Dev cpp but i also tried the online compiler for the following code to display employees salary using conditional operators... the code does not take input for Qualification and I cant figure out why..pls Help
#include <stdio.h>
#include <math.h>
int main()
{
    int yos;
    char g, q;
    printf("Enter Gender (m-Male , f-Female) : ");
    scanf("%c",&g);
    printf("Enter Years of Service : ");
    scanf("%d",&yos);
    printf("Enter Qualification (g-Graduate , p-Post Graduate) : ");
    scanf("%c",&q);
    printf("Your Salary is : ");
    
        if(g=='f'&&yos>=10&&q=='p')
    printf("12000");
    
        if(g=='m'&&yos>=10&&q=='p')
    printf("11000");
    
        if(g=='m'&&yos>=10&&q=='g'||g=='m'&&yos<10&&q=='p'||g=='f'&&yos<10&&q=='p')
    printf("10000");
    
        if(g=='f'&&yos>=10&&q=='g')
    printf("9000");
    
        if(g=='m'&&yos<10&&q=='g')
    printf("7000");
    
        if(g=='f'&&yos<10&&q=='g')
    printf("6000");
    return 0;
}
 
    