友友们帮我看这个代码怎么改吧

``友友们这个选择结构怎么写呀,我写了代码,但是它是错的`

img

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

int main()
{
    int age;
    char str1[20];
    char str2[20];
    scanf("%d\n",&age);
  
    gets(str1);     
    gets(str2);
     if(str1=="EIE"){
        if(age>25||str2=="A")
        {
            printf("YES");
        }else{
            printf("NO");
        }
    }else if(str2=="CS"){
        if (age<28){
            printf("YES");
            }
            else{
                  printf("NO");
            }

    }
    return 0;
}

```

修改如下,供参考:

#include<stdio.h>
#include <string.h>
int main()
{
    int age;
    char str1[20];
    char str2[20];
    scanf("%d %s %s",&age,str1,str2);
    //gets(str1);
    //gets(str2);

    if(strcmp(str1,"EIE") == 0) { //if(str1=="EIE")
        if(age > 25 || strcmp(str2,"A") == 0)//str2=="A"
        {
            printf("YES");
        }else{
            printf("NO");
        }
    }else if(strcmp(str1,"CS") == 0) {//if(str2=="CS")
        if (age<28){
            printf("YES");
        }
        else{
            printf("NO");
        }
    }
    return 0;
}

程序修改如下所示,看能否满足需求:

#include<stdio.h>
#include <string.h>
 
int main()
{
    int age;
    char str1[20];
    char str2[20];
    scanf("%d\n",&age);
  
    gets(str1);     
    gets(str2);
     if(strcmp(str1,"EIE")==0)
     {
        if(age>25||strcmp(str2,"A")==0)
        {
            printf("YES");
        }else{
            printf("NO");
        }
    }
    else if(strcmp(str2,"CS")==0)
    {
        if (age<28)
        {
            printf("YES");
        }
        else
        {
            printf("NO");
        }
 
    }
    return 0;
}