#include <bits/stdc++.h>
using namespace std;
int main() {int piece=3,n=0,yes=0,no=0;char m1_eng[piece][30]= {"apple","orange","banana"};char m1_ch[piece][60]= {"苹果","橘子","香蕉"};char input[30];bool testing=true;for(int i=0; i<piece; i++) {printf("请输入%s的英文: ",m1_ch[i]);testing=true;n=strlen(m1_eng[i]);for(int j=0; j<n; j++)cin>>input[j];for(int j=0; j<n; j++) {if(input[j]!=m1_eng[i][j]) {testing=false;break;}}if(testing) {yes++;} else {no++;}}cout<<"你答对了"<<yes<<"个单词, 答错了"<<no<<"个单词。"<<endl;
}
本文发布于:2024-01-28 05:23:48,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17063906325097.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |