文章分类 -  C语言

摘要:1 #include "stdio.h" 2 //判断小明家鸡蛋个数 3 int yn(int z){ 4 int num=1; 5 while(num++){ 6 if(num%3==1&&num%5==z&&num%7==3){ 7 return num; 8 } 9 } 10 11 } 12 阅读全文
posted @ 2022-06-04 15:02 Bruce_Sun 阅读(31) 评论(0) 推荐(0)
摘要:定义结构 为了定义结构,您必须使用 struct 语句。struct 语句定义了一个包含多个成员的新的数据类型,struct 语句的格式如下: struct tag { member-list member-list member-list ...} variable-list ; tag 是结构体 阅读全文
posted @ 2021-01-29 12:55 Bruce_Sun 阅读(107) 评论(0) 推荐(0)
摘要:1.查找:Ctrl+F2. Build并运行:F93. Build项目:Ctrl+F94. 运行:Ctrl+F105.debug:F86.Step over a code block:F77.Step into a code block:Shift + F78.Step out of a code 阅读全文
posted @ 2021-01-29 12:37 Bruce_Sun 阅读(195) 评论(0) 推荐(0)
摘要:C语言字符串输出 printf("%s\n", s);char aaa[] = "aaa";//输出单个字符百分号后面用c,输出字符串百分号后面用sprintf("%c\n", *(aaa + 1)); or printf("%c\n", aaa[0]); 阅读全文
posted @ 2021-01-29 12:35 Bruce_Sun 阅读(89) 评论(0) 推荐(0)