摘要: #include<stdio.h>int main(void){ int n,i; double sum; sum=0; scanf("%d",&n); for(i=1;i<=n;i++){ sum=sum+1.0/i; } printf("sum=%lf",sum); return 0;} 阅读全文
posted @ 2023-12-03 17:17 Grit_Doyle 阅读(4) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(void) { int fahr,lower,upper; double celsius; scanf("%d",&lower); scanf("%d",&upper); if(lower<=upper) { printf("faher celsi 阅读全文
posted @ 2023-12-03 17:16 Grit_Doyle 阅读(4) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<math.h>int main(void){ double x,y; scanf("%lf",&x); if(x>=0) y=sqrt(x); else y=pow(x+1,2)+2*x+1/x; printf("y=f(%lf)=%.2lf",x 阅读全文
posted @ 2023-12-03 17:15 Grit_Doyle 阅读(6) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(void){ double x,y; scanf("%lf",&x); if(x==0) y=0; if(x!=0) y=1/x; printf("y=f(%lf)=%.1lf",x,y); return 0;} 阅读全文
posted @ 2023-12-03 17:15 Grit_Doyle 阅读(6) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(void){ int i1,i2; //定义两个数; int sum,different,product; //和,差,积 double quotient; //商 scanf("%d %d",&i1,&i2); sum=i1+i2; differ 阅读全文
posted @ 2023-12-03 17:14 Grit_Doyle 阅读(4) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(void){ int g,t; //g加速度,t下落时间 double s; //s下落距离 g=10; t=3; s=0.5*g*t*t; printf("s=%lf",s); return 0;} 阅读全文
posted @ 2023-12-03 17:13 Grit_Doyle 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(void){ int celsius,fahr; fahr=150; celsius=5*(fahr-32)/9; printf("fahr=%d,celsius=%d\n",fahr,celsius); return 0;} 阅读全文
posted @ 2023-12-03 17:12 Grit_Doyle 阅读(5) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(void) { printf("1-100中能被6整除的所有数的和:\n"); int i,sum=0; //i是1-100间的数;sum是1-100中能被6整除的所有数的和 for(i=1; i<=100; i++) { if(i%6==0) { 阅读全文
posted @ 2023-12-03 17:08 Grit_Doyle 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1、选择需要缩进的段落,或全选正文内容(Ctrl+A); 2、鼠标右键,在菜单中选中【段落】选项; 3、在“段落”对话框中的“特殊格式”选择【首行缩进】,选中后“缩进值”默认是2个字符; 阅读全文
posted @ 2023-03-03 13:30 Grit_Doyle 阅读(570) 评论(0) 推荐(0) 编辑
摘要: 1.xls是一个特有的二进制格式,其核心结构是复合文档类型的结构,而xlsx的核心结构是XML类型的结构,采用的是基于 XML 的压缩方式,使其占用的空间更小。2.xls是excel2003及以前版本生成的文件格式,而xlsx是excel2007及以后版本生成的文件格式3.xlsx格式是向下兼容的, 阅读全文
posted @ 2022-08-31 15:48 Grit_Doyle 阅读(1255) 评论(0) 推荐(0) 编辑