




已阅读5页,还剩12页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
#include void main() long f=/*/ /*/; int i; for (i=1;i=13;/*/ /*/) f=f*i; printf(nf=%ld, f); getch(); #includevoid main() int p,q,r; float f; clrscr(); printf(Please input p q :); scanf(%d%d,/*/ /*/); f=1.0*p/q; r= (int)/*/ /*/%10; printf(n p/q=%f The first decimal place is: %dn,f,r); getch();#include #include double f(double /*/ /*/)return (x*x*x+1.3*x*x+1.1*x-1.2);void main()float x,x1,x2; double y,y1,y2; do printf(Input x1,x2:); scanf(%f,%f,&x1,&x2); y1=f(x1); y2=f(x2); while(y1*y2=0); do x=(x1+x2)/2; y=/*/ /*/ (x); y1=f(x1); if(y*y10) x1=x; else x2=/*/ /*/; while(fabs(y)=1e-6); printf(Root of Equation is %8.3fn,x); getch();#include #include void main() char s20; int i; printf(Please input a string:); scanf(/*/ /*/,s ); i=0; while(si) si=/*/ /*/ /*/ /*/ printf(n Target string: %sn, s); getch(); #include void main() int i,n; /*/ /*/; for(i=1;i=/*/ /*/ ;i+) if( (i%3=0 | i %7=0) & ( i% /*/ /*/ =3 ) ) printf(%5d,i); n+; if(n%6=0) printf(n); getch();#include #include void sort(int a, int n) int i, j, k, temp; for( i = 0; i n-1; i+ ) k = i; for(/*/ /*/; j n; j+) if(/*/ /*/) k=j; if( k != i ) temp=/*/ /*/; ak=ai; ai=temp; void main() int a = 50,25,88,32,2,65,7,64; int i,n = sizeof(a)/sizeof(int); sort(a,n); for(i=0;in;i+) printf(%d ,ai); printf(n); getch();#include#include/*/ /*/double f(double x)double y; y=/*/ /*/; return (y); void main()double x,y1,y2; printf(Please input x:); scanf(%lf,&x); y1=f(/*/ /*/); y2=f(sin(x); printf(nf(x+1.1)=%.3lf,y1); printf(nf(sinx)=%.3lf,y2); getch();#include #include int count(/*/ /*/) int n=0; char *p=/*/ /*/; while(*p) if(*p=a) n+; /*/ /*/; return n; void main() char s255; printf(Enter a string:); gets(s); printf(Count of a is:%dn,count(s); getch();#includestdio.h#define ROW 3#define COL 4void main()int aROWCOL=2,11,3,5,7,24,8,9,16,10,18,66; int bROWCOL=1,9,5,12,6,11,13,2,15,7,25,56; int c/*/ /*/COL,i,j; for(i=0;iROW;i+) for(j=0;jCOL;j+) cij=/*/ /*/ for(i=0;iROW;i+) for(j=0;j/*/ /*/;j+) printf(%5d,cij); printf(n); getch();#include unsigned long fun(unsigned long n) unsigned long x=0;int t=0; while(n) t=n%10; if(t%2=/*/ /*/) x=/*/ /*/+t; n=n/10; return x; void main() unsigned long n=-1; while(n99999999|n0) printf(Please input(0n1000000000):); scanf(%ld,&n); printf(nThe result is:%ldn,fun(n); getch();#include void main()int a,b,temp; printf(a,b=); scanf(%d,%d,&a,&b); if(ab) if(/*/ (a%2) /*/) printf(%5d,a); getch();#include /*/void fun(int n)/*/ double y = 0.0; int a=2,b=1,c,k; for(k=1;k=n;k+) /*/ y+=(Double)a/b; /*/ c=a; /*/ a=b /*/; b=c; return y;void main() printf(fun(5) = %lfn, fun(5); getch();#include void main()/*/ int a=10; num,mark; /*/ char op,es; printf(Input an Expression: a); scanf(%c%c%d,&op,&es,&num); mark=0; if(es=) /*/ swich /*/(op) case +: a=a+num; break; case -: a=a-num; break; case *: a=a*num; break; case /: if(num) a=a/num ; else mark=1; break; default: mark=1; else mark=1; if(!mark) printf(a=%dn,a); else printf(Error!n); getch();#include int fun(int *x,int y) int t; t=*x;/*/ x=y; /*/*/ return(y); /*/void main() int x=6,y=8; printf(%d,%dn,x,y); y=fun(&x,y); printf(%d,%dn,x,y); getch();#include #include void main()/*/ character str100; /*/ int number,u_letter,l_letter,i; number =u_letter =l_letter=0; printf(Please input string:); gets(str); /*/ i=1; /*/ while(stri) if (stri=0 & stri=A | stri=n & stri=z) l_letter+; i+; printf(number=%d,u_letter=%d,l_letter=%dn,number,u_letter,l_letter); getch();#include #include void main() char s20=international 51,t20; char tab52=c,h,i,a,a,b,e,g,l,p; int i,j=0;/*/ strcmp(t,s); /*/ while(tj) for(i=0;/*/ i=3 /*/;i+) if(tj=tabi0) /*/ tj=tabi; /*/ break; j+; printf(nThe soure string: %sn,s); printf(nThe target string: %sn,t); getch();#include void main()/*/ int i=1,n=1; /*/ do if(i%3=2 & /*/ i%5=3 /*/) printf(%5d,i); n+; if(!(n%5) printf(n); i+; /*/ while(i1000) /*/ getch();#include void fun(char *p,char *b) int i,k=0; while(*p) i=1; while(i=4&*p) /*/ bk=p; /*/ k+; p+; i+; if(*p) /*/ bk+= ; /*/ bk=0;void main() char a80,b80; printf(Enter a string:); gets(a); printf(The original string:); puts(a); fun(a,b); printf(nThe string after insert space:); puts(b); printf(n); getch();#include void main()/*/ int n,i,bk; /*/ printf(Input a num(1-9):); scanf(%d,&n); for(i=1;i=n;i+) for(bk=1;bk=n;bk+) printf( ); for(j=1;/*/ j=i+1 /*/;j+) printf(%d,i); printf(n); for(i=1;i=n;i+) for(bk=1;bk=i;bk+) printf( ); for(j=1;j=n-i+1;j+) printf(%d,n-i+1); printf(/*/ /n /*/); getch();#include void main() int r,m,n,p,q; printf(Enter m,n: ); scanf(%d,%d,&m,&n); p=m; q=n;/*/ r=m/n; /*/ while(/*/ r=0 /*/) m=n; n=r; r=m%n; printf(gcd(%d,%d)=%d n,p,q,n); getch();#include #include double fun(double x,double y) /*/ /*/ void main() printf(fun(1.1,0.2) = %6.3lfn, fun(1.1,0.2); getch();#include int fun(int x,int a,int n,int b,int c) /*/ /*/ void main() int n=10,i,x,nb; int aa10=32, -5, -31, -10, 25, 50, 12, 15, -16, 18; int bb10,cc10; clrscr(); printf(Please input x:); scanf(%d,&x); printf(Count of array aa:%3dn,n); printf(Element of array aa:); for(i=0;in; i+) printf(%5d,aai); printf(n); nb=fun(x,aa,n,bb,cc); printf(Element of array bb:); for(i=0;inb;i+) printf(%5d,bbi); printf(n); printf(Element of array cc:); for(i=0;inb;i+) printf(%5d,cci); printf(n); printf(Count of array bb:%3dn,nb); getch();#include #include double fun1(double x) /*/ /*/ void main() printf(fun1(2.5) = %6.3lfn, fun1(2.5); getch();#include #include void fun(char *s,char t) /*/ /*/void main() char s100,t100; printf(nPlease enter string s: ); scanf(%s,s); fun(s,t); printf(nThe result is:%sn,t); getch();#include #include double fun(float x) /*/ /*/void main() float x; printf(Please input a number:); scanf(%f,&x); printf(fun(%.2f)=%.2lfn,x,fun(x); getch();#include #include void fun(int a,int b,long *c) /*/ /*/void main() int a,b; long c; printf(Input a,b: ); scanf(%d,%d,&a,&b); fun(a,b,&c); printf(The result is:%ld,c); getch();#include #include double fun(float x) /*/ /*/void main() float x; printf(Please i
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 劳动的发言稿300字
- 时间管理课件-哈佛
- 车床操作规程培训
- 少先队大队委培训
- 二零二五年电商代运营品牌形象授权使用合同
- 二零二五年度变电工程高空作业安全防护合同
- 二零二五年度互联网+农业服务平台建设合同
- 二零二五年度材料代购及绿色环保验收合同范本
- 二零二五年度船舶抵押贷款合同规范文本
- 二零二五年新型电商代运营服务合同示范文本
- 留疆战士考试题库及答案
- 16J914-1 公用建筑卫生间
- GB/T 7324-2010通用锂基润滑脂
- GB/T 20000.1-2014标准化工作指南第1部分:标准化和相关活动的通用术语
- DB51∕T 2616-2019 机关会议服务规范
- 哲学导论(完整版)
- 气瓶检验站乙炔瓶检验
- 工艺美术专业人才培养方案调研报告
- 《上海市城镇职工基本医疗保险综合减负申请表》
- 汉语拼音发音表(适合初学者和老年人)
- 购物中心商场商户促销活动管理制度
评论
0/150
提交评论