不可思议404

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2014年9月22日

摘要: #include #include /*输入5个学生的名字(英文),使用冒泡排序按从大到小排序。提示:涉及到字符串数组,一个字符串是一个一维字符数组;一个字符串数组就是一个二维字符数组。*/void main(){ char stuNames[5][100]; char tmp[100]; int ... 阅读全文
posted @ 2014-09-22 20:05 不可思议404 阅读(623) 评论(0) 推荐(0) 编辑

摘要: #include void main(){ char str1[100] = "hello"; char str2[100] = "world"; int i = 0; for(i = 0;str1[i] != 0 && str2[i] != 0;i++) { if(str1[i] > str2... 阅读全文
posted @ 2014-09-22 20:04 不可思议404 阅读(103) 评论(0) 推荐(0) 编辑

摘要: #include #include /*完成一个登陆页面。(用户名:F11;密码:123456)。要求用户输入用户名和密码,验证是否等于正确值。如果等于告知登陆成功,程序结束;否则告知用户名密码有误。用户三次输入不正确,告知登陆失败,程序结束 。*/ void main(){ char usern... 阅读全文
posted @ 2014-09-22 20:03 不可思议404 阅读(819) 评论(0) 推荐(0) 编辑

摘要: #include #include /*自己实现strcat函数的功能。(假如字符数组足够大)*/ void main(){ char str1[100] = "helloworld"; char str2[100] = "world"; int i = 0; int index = strlen... 阅读全文
posted @ 2014-09-22 20:02 不可思议404 阅读(238) 评论(0) 推荐(0) 编辑

摘要: #include #include /*输入任意一个字符串,如:“abDEe23dJfd343dPOddfe4CdD5ccv!23rr”。 取出该字符串中所有的字母组成一个新的字符串。*/ void main(){ char oldStr[100] = "abDEe23dJfd343dPOdd... 阅读全文
posted @ 2014-09-22 20:01 不可思议404 阅读(173) 评论(0) 推荐(0) 编辑

摘要: #include #include /*查找“asdfjvjadsffvaadfkfasaffdsasdffadsafafsafdadsfaafd”, 打印出该字符串中有多少个"af"。*/void main(){ char str[] = "asdfjvjadsffvaadfkfasaffds... 阅读全文
posted @ 2014-09-22 20:00 不可思议404 阅读(415) 评论(0) 推荐(0) 编辑

2014年9月16日

摘要: 刚接触到C语言,语法上面的掌握还算OK。算法上面的失误让我有点懊恼!多多加油吧~~~ #include /*用户任意输入一个字符串,把该字符串的大写字母变小写,小写变大写。*/void main(){ char str[100]; int i = 0; printf("请任意输入一个字符串:"... 阅读全文
posted @ 2014-09-16 23:40 不可思议404 阅读(349) 评论(0) 推荐(0) 编辑