题解 | while
while
https://www.nowcoder.com/practice/173564fc07c146a88c408c92f4182c65
#include <stdio.h>
int main() {
char s[100];
scanf("%s",s);
int count=0;
if (s[0]!='w') {
count++;
}
if (s[1]!='h') {
count++;
}
if (s[2]!='i') {
count++;
}
if (s[3]!='l') {
count++;
}
if (s[4]!='e') {
count++;
}
printf("%d\n", count);
return 0;
}
查看4道真题和解析