求一简单判断英语句子语法“c++程序”!只要求能够判断 (he ,she与is; I与am; you与are)是否搭配就行.

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/09 10:05:01

求一简单判断英语句子语法“c++程序”!只要求能够判断 (he ,she与is; I与am; you与are)是否搭配就行.
求一简单判断英语句子语法“c++程序”!
只要求能够判断 (he ,she与is; I与am; you与are)是否搭配就行.

求一简单判断英语句子语法“c++程序”!只要求能够判断 (he ,she与is; I与am; you与are)是否搭配就行.
char checkassembled(char * subject,char * predicate)
{
if((memcmp(subject,"he",2) == 0 || memcmp(subject,"she",3) == 0 ) && memcmp(predicate,"is",2) == 0)
{
return 0;
}
if(memcmp(subject,"I",1) == 0 && memcmp(predicate,"am",2) == 0)
{
return 0;
}
if(memcmp(subject,"You",3) == 0 && memcmp(predicate,"are",3) == 0)
{
return 0;
}
return 1;
}