#include<stdio.h> #include<string.h> int main() { char str[100]; printf("⊙▽⊙"); int a; a = 0; printf("你好"); if(strcmp(str,"hi")==0) { printf("666"); a = a + 1; } printf("分数是%d\n", a); return 0; }
#include<stdio.h> #include<string.h> int main() { char str[100]; printf("⊙▽⊙\n"); int a; a = 0; printf("你好\n"); gets(str); if (strcmp(str, "hi") == 0) { printf("666\n"); a = a + 1; } printf("分数是%d\n", a); return 0; }