摘要: #include <stdio.h> //计算用1分钱 2分钱 5分钱组成1元钱的方式 //要求三种钱都必须有,共有多少种组成方式,并输出相应的组成方式 //【1】【2】【3】填写最小的可能的数 main() { int a,b,c,d=0; for(a=1;a<【1】;a++) for(b=1;b 阅读全文
posted @ 2023-02-18 16:34 myrj 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //s=1+2+6/4+10/6+16/10+26/16+.....前30项的和 main() { int i,t; float a=【1】,b=【2】,s=【3】; for(i=1;i<=【4】;i++) { s=【5】; t=【6】; a=【7】; b=t; 阅读全文
posted @ 2023-02-18 14:10 myrj 阅读(35) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> 【1】 //逆序输出任意字符串 void severse_string(char arr【2】) { int len = strlen(arr); int left = 0; int right = len - 1; while (left < right) { 阅读全文
posted @ 2023-02-18 11:22 myrj 阅读(41) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> 【1】 //逆序输出任意字符串 void severse_string(char【2】str) { int len = strlen(str); char* left = str; char* right = str + len - 1; while (left 阅读全文
posted @ 2023-02-18 11:19 myrj 阅读(38) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //逆序输出任意字符串 【1】 main() { char zf[100]; int a,b; 【2】; a=【3】; for(b=a-1;b>=0;b--) printf("%c",zf[b]); getchar(); } #include <stdio.h> 阅读全文
posted @ 2023-02-18 11:10 myrj 阅读(59) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //从键盘输入一个整数,如果不高于100则逆序输出,否则输出"输入范围错误" 【1】 nx(int n) { while(n) { printf("%d",【2】); 【3】; } printf("\n"); } main() { int shu,a,b; 【4 阅读全文
posted @ 2023-02-18 11:06 myrj 阅读(47) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //求n的阶乘 long factorial(int n) { if (n == 0 || n == 1) { return 1; } else { return factorial(n - 1) * n; // 递归调用 } } long jc(int n) 阅读全文
posted @ 2023-02-18 09:26 myrj 阅读(227) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //从整体上看,C语言代码是由一个一个的函数构成的,除了定义和说明类的语句(例如变量定义、宏定义、类型定义等)可以放在函数外面, //所有具有运算或逻辑处理能力的语句(例如加减乘除、if else、for、函数调用等)都要放在函数内部。 int a = 10; 阅读全文
posted @ 2023-02-18 09:21 myrj 阅读(50) 评论(0) 推荐(0) 编辑
摘要: //如果要规定上下限:a b(b>a) /// rand() %(b-a+1) + a; //产生a~b的随机数 //分析:取模即取余,rand()%51+13我们可以看成两部分:rand()%51是产生 0~50 的随机数,后面+13保证 a 最小只能是 13,最大就是 50+13=63。 //产 阅读全文
posted @ 2023-02-18 09:14 myrj 阅读(30) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <math.h> //利用公式求π:1-1/3+1/5...=π/4 //直到最后一项的绝对值小于0.000001为止 ,结果保留6位小数 int main(){ float s=1; float pi=0; float i=1.0; floa 阅读全文
posted @ 2023-02-18 09:03 myrj 阅读(502) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> 【1】 //利用公式求π:1-1/3+1/5...=π/4 //直到最后一项的绝对值小于0.000001为止 ,结果保留6位小数 int main(){ float s=1; float pi=0; float i=1.0; float n=1.0; while 阅读全文
posted @ 2023-02-18 08:55 myrj 阅读(232) 评论(0) 推荐(0) 编辑
摘要: Sub CheckTableCells() Application.DisplayAlerts = False Dim sht As Worksheet Dim i, j As Integer For i = 1 To 284 If (Range("e" & i).Value = "") Then 阅读全文
posted @ 2023-02-18 08:08 myrj 阅读(40) 评论(0) 推荐(0) 编辑