kwrl.net
当前位置:首页 >> 用C语言编写一个单词接龙的小游戏 >>

用C语言编写一个单词接龙的小游戏

int main(){ char first[20] = {0}; char second[20] = {0}; char key[20] = {0}; //input printf("please input first word:"); scanf("%s", first); printf("please input second word:"); scanf("%s", second); //begin bool found = false; ...

#include main() { char s1[100], s2[100]; int i, j; for(i = strlen(s1)-1, j=0; i>= 0 && j < strlen(s2); i--, j++) if(s1[i] != s2[j]) break; if(j == 0) printf("接龙不成功\n"); else printf("%s\n", s1[i+1]); }

网站首页 | 网站地图
All rights reserved Powered by www.kwrl.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com