上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 187 下一页
摘要: 在C语言中,指针变量的值就是一个内存地址,&运算符的作用也是取变量的内存地址,请看下面的代码: #include <stdio.h> #include <stdlib.h> int a = 1, b = 255; int main(){ int *pa = &a; printf("pa = %#X, 阅读全文
posted @ 2022-10-05 18:41 myrj 阅读(182) 评论(0) 推荐(0)
摘要: import requests r=requests.head(urla,stream=True) #aa=requests.post(url,headers=head1,json=json2) urlx=r.headers['Location'] 阅读全文
posted @ 2022-10-05 15:14 myrj 阅读(80) 评论(0) 推荐(0)
摘要: 有4个圆塔,圆心分别为(2,2)、(-2,2)、(-2,-2)、(2,-2),圆半径为1。这4个塔的高度为10m,塔以外无建筑物。今输入任一点的坐标,求该点的建筑高度(塔外的高度为0) #include <stdio.h> //四个圆心坐标:(2,2) (-2,-2) (2,-2) (-2,2) / 阅读全文
posted @ 2022-10-05 09:17 myrj 阅读(300) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <math.h> main() { int a,b,c,d; for(a=-9;a<=9;a++) { for(b=1;b<=19-abs(a);b++) printf(" "); for(c=0;c<2*abs(a)+1;c++) print 阅读全文
posted @ 2022-10-05 09:11 myrj 阅读(992) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-10-02 11:05 myrj 阅读(280) 评论(0) 推荐(0)
摘要: #include <stdio.h> //数组整体赋值使用scanf()用数组名只能给第一个赋值 main() { int a[4],b; scanf("%d",a); for(b=0;b<4;b++) printf("%d ",a[b]); getchar(); } 搜索 复制 阅读全文
posted @ 2022-09-30 15:07 myrj 阅读(314) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> void lianjie(char a[],char b[],char c[]) { int i,j,len1=strlen(a),len2=strlen(b); for(i=0;i<len1;i++) c[i]=a[i] 阅读全文
posted @ 2022-09-30 11:04 myrj 阅读(226) 评论(0) 推荐(0)
摘要: #include <stdio.h> //求最大公约数:辗转相除法:辗转相除法是求两个自然数的最大公约数的一种方法,也叫欧几里德算法。 //319 377:319%377=319 377%319=58 319%58=29 58%29=0 29为最大公约数 int gys(int a,int b) { 阅读全文
posted @ 2022-09-29 16:10 myrj 阅读(196) 评论(0) 推荐(0)
摘要: #include <stdio.h> //求最大公约数:辗转相除法:辗转相除法是求两个自然数的最大公约数的一种方法,也叫欧几里德算法。 //319 377:319%377=319 377%319=58 319%58=29 58%29=0 29为最大公约数 main() { int a=319,b=3 阅读全文
posted @ 2022-09-29 16:02 myrj 阅读(333) 评论(0) 推荐(0)
摘要: #include <stdio.h> //<<九章算术>>更相减损法: 可以用来求两个数的最大公约数,即“可半者半之,不可半者,副置分母、子之数,以少减多,更相减损,求其等也。 //以等数约之。 ///第一步:任意给定两个正整数;判断它们是否都是偶数。若是,则用2约简;若不是则执行第二步。 //第二 阅读全文
posted @ 2022-09-29 14:50 myrj 阅读(285) 评论(0) 推荐(0)
上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 187 下一页