上一页 1 ··· 120 121 122 123 124 125 126 127 128 ··· 186 下一页
摘要: #include <stdio.h> main() { float x=2.0,y=1.0,z=0.0,sum=0.0; int a; for(a=1;a<=20;a++) { sum=sum+x/y; z=x; x=x+y; y=z; } printf("%f",sum); getchar(); 阅读全文
posted @ 2021-10-06 21:15 myrj 阅读(163) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <math.h> main() { int s=0,a,n,i,m=0; //a=2,n=4; scanf("%d,%d",&a,&n); for(i=1;i<=n;i++) { m=pow(10,i-1)+m; //printf("%d\n" 阅读全文
posted @ 2021-10-06 20:10 myrj 阅读(759) 评论(0) 推荐(0)
摘要: 控制继电器是一种自动电器,它适用于远距离接通和分断交、直流小容量控制电路,并在电力驱动系统中供控制、保护及信号转换用。控制继电器的输入量通常是电流、电压等电量,也可以是温度、压力、速度等非电量,输出量则是触点动作时发出的电信号或输出电路的参数变化。继电器的特点是当其输入量的变化达到一定程序时,输出量 阅读全文
posted @ 2021-10-04 07:45 myrj 阅读(574) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <math.h> //PI/4=1-1/3+1/5-1/7+1/9-1/11+..... int main() { float pi,i,a=1; for(i=1;i<=20000;i=i+2) { if(fabs((1.0/i*pow((-1 阅读全文
posted @ 2021-09-27 16:55 myrj 阅读(133) 评论(0) 推荐(0)
摘要: #include <stdio.h> //多分支结构中的default可以放在花括号中任意位置 main() { int a; scanf("%d",&a); switch(a) { default:printf("no"); case 1:printf("a");break; case 2:pri 阅读全文
posted @ 2021-09-26 07:02 myrj 阅读(129) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int a,b,c,d; a=0,b=0,c=0; d=c++ || a++ && b++; printf("%d,%d,%d,%d",a,b,c,d); getchar(); } #include <stdio.h> int main 阅读全文
posted @ 2021-09-25 17:09 myrj 阅读(49) 评论(0) 推荐(0)
摘要: #include <stdio.h> //从大到小排序 void swap(int *a,int *b) { int tmp = *a; *a = *b; *b = tmp; } int main() { int a,b,c; scanf("%d,%d,%d",&a,&b,&c); if(a<b) 阅读全文
posted @ 2021-09-18 10:10 myrj 阅读(170) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <windows.h> #define N 100 void del_char(char a[],char c)//删除字符串中 阅读全文
posted @ 2021-09-17 13:05 myrj 阅读(275) 评论(0) 推荐(0)
摘要: char s[MAX] ={0}; //´æ·ÅÔ´×Ö´® char s1[MAX]={0}; //´æ·Å×Ó×Ö´® char s2[MAX]={0}; //´æ·ÅÌæ»»×Ö´® char result_a[2000] = {0};//´æ· 阅读全文
posted @ 2021-09-17 10:00 myrj 阅读(76) 评论(0) 推荐(0)
摘要: #include <stdio.h> //a查找范围 b查找目标 int fun(char *a,char *b) { int n=0; while(*a) { if(*a==*b) n++; a++; } return n; } int main() { char zf[]="我喜欢我我我我C语言 阅读全文
posted @ 2021-09-17 09:22 myrj 阅读(523) 评论(0) 推荐(0)
上一页 1 ··· 120 121 122 123 124 125 126 127 128 ··· 186 下一页