05 2019 档案
摘要:C语言getch()函数实现打印字符的ASCII码,并且实现按键继续 源代码: #include <stdio.h> int main() { int ch; char ch2; int i; for(i=0;i<10;i++) { ch=getch(); //获取键盘输入,只能输入单个字符,支持上
阅读全文
摘要:结构作为函数参数的三种传递方式 - 结构作为函数参数的三种方式 1.传递结构成员 2.传递结构 3.传递结构的地址 //1.传递结构成员 #include <stdio.h> #include <stdlib.h> //花呗还款简单举例 struct account { char * bankNam
阅读全文
摘要:结构体数组 #include <stdio.h> #include <stdlib.h> #define MAX 7 struct Hero { int id; //武将编号 char name [20]; //武将名字 char name2 [20]; //武将称号 int level; //等级
阅读全文
摘要:C语言简单登录验证实现 代码: #include <stdio.h> #include <stdlib.h> #define USER_NAME "admin" #define PASSWORD "admin" int main() { int putin(); putin(); return 0;
阅读全文