版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
进入 程序分析:可填在百位、十位、个位的数字都1、2、3、4。组成所有的排列后再去{inti,j,k; for{if(i!=k&&i!=j&&j!=k) /*i、j、k三位互不相同*/}}题目:企业的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润
于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,成7.5%;20万到40万之间时,高于20万元的部分,可提成5%;40万到60万之间{longint elseelseif(i<=400000)elseif(i<=600000)elseif(i<= }{longintfor{x=sqrt(i+100); /*x为加上100后开方后的结果*/ }}{intday,month,year,sum,leap;printf("\npleaseinputyear,month,day\n");{case1:sum=0;break;case2:sum=31;break;case3:sum=59;break;case4:sum=90;break;case5:sum=120;break;case6:sum=151;break;case7:sum=181;break;case8:sum=212;break;case9:sum=243;break;case10:sum=273;break;case11:sum=304;break;case} printf("Itisthe%dth{intx,y,z,t;if(x>y){t=y;y=z;z=t;}/*交换z,y的值*/printf("smalltobigd%dd\n",x,y,z);}{printf("oC-world!\n");printf("****\n");printf("*\n");printf("*\n");printf("****\n");}{chara=176,b=219;{intfor{{位}}}{inti,j;{printf("}}{int{}}{longf1,f2;inti;{printf("%12ldf1=f1+f2;/*前两个月加起来赋值给第三个月*/f2=f1+f2;/*前两个月加起来赋值给第三个月*/}}{intm,i,k,h=0,leap=1;{k=sqrt(m+1);}}printf("\nThetotalis}{intprintf("'waterflower'numberis:");{{}}}如果这个质数恰等于/*zhengintisdividedyinshu*/{intprintf("\npleaseinputa{{{printf("%d*",i);}}}的用B表示,{intscore;chargrade;printf("pleaseinputascore\n");printf("%dbelongsto}{inta,b,num1,num2,temp;printf("pleaseinputtwonumbers:\n");{}{}}{charintletters=0,space=0,digit=0,others=0;printf("pleaseinputsomecharacters\n");{elseif(c=='')}
printf("allinall:char=%dspace=%ddigit=%dothers=%d\n",letters,}题目:求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。例如2+22+222 {inta,n,count=1;longintsn=0,tn=0;printf("pleaseinputaandn\n");{}}找出1000以内的所有完数。{staticintk[10];inti,j,n,s;{{{}}{printf("%disawanshu",j);}}}{intn;{sn=sn+2*hn;/*n次落地时共经过的米数*/hn=hn/2;/*第n次反跳高度*/}printf("thetotalofroadis%f\n",sn);printf("thetenthis%fmeter\n",hn);}下{intday,x1,x2;{x1=(x2+1)*2;/*2天桃子数12倍*/}printf("thetotalis}{{{{printf("orderisa--%c\tb--%c\tc--}}}}**{inti,j,k;{printf("");}{printf("");}}{intn,t,number=20;floata=2,b=1,s=0;{}printf("sumis}{floatn,s=0,t=1;{}}{intintfact();}intfact(j)intj;{intsum;returnsum;}{intvoidpalin(intn);}voidpalin(n)intn;{char{}{}}岁int{intc;if(n==1)c=10;elsec=age(n-1)+2;}{}main(){longif(a!=0)printf("thereare5,%ld%ld%ld%ld%ld\n",e,d,c,b,a);elseif(b!=0)printf("thereare4,%ld%ld%ld%ld\n",e,d,c,b);elseif(c!=0)printf("thereare3,%ld%ld%ld\n",e,d,c);elseif(d!=0)printf("thereare2,%ld%ld\n",e,d);elseif(e!=0)printf("thereare}main({if(ge==wan&&shi==qian)/*个位等于万位并且十位等于千位*/printf("thisnumberisahuiwen\n");printf("thisnumberisnota}voidmain(){charprintf("pleaseinputthefirstletterofsomeday\n");{switch{case'S':printf("pleaseinputsecondletter\n");elseif((letter=getch())=='u')elseprintf("dataerror\n");case'F':printf("friday\n");break;casecase'T':printf("pleaseinputsecondletter\n");elseif((letter=getch())=='h')elseprintf("dataerror\n");case'W':printf("wednesday\n");break;default:printf("dataerror\n");}}}题目:Pressanykeytochangecolor,doyouwanttotryit.Pleasehurryvoidmain(void){intfor(color=0;color<8;{cprintf("Thisiscolor%d\r\n",color);cprintf("Pressanykeytocontinue\r\n");}}voidmain(void){gotoxy(1,5);/*定位函数*/cprintf("Outputatrow5column1\n");gotoxy(20,cprintf("Outputatrow10column}#include<stdio.h>{printf("o,}voidthree_{intforcounter1counter3;counter++)}void{}voidmain(void){intfor(color=1;color<16;{cprintf("Thisiscolor%d\r\ncolor);}textcolor(128+15);cprintf("Thisisblinking\r\n");}#include"math.h"#defineN101{int{{}}#defineN10{int/*inputprintf("pleaseinputtennum:\n");{/*sorttennum*/if(a[min]>a[j])min=j;}/*outputdata*/printf("Aftersorted\n");}{floata[3][3],sum=0;inti,j;printf("pleaseinputrectangleelement:\n");printf("duijiaoxianheis}{intinttemp1,temp2,number,end,i,j;printf("originalarrayis:\n");printf("insertanewnumber:");{}}}}}#defineN5{inta[N]={9,6,5,4,1},i,temp;printf("\noriginalarray:\n");}printf("\nsortedarray:\n");}{intstaticintstatic_var=0;printf("\40:varequal%d\n",var);printf("\40:staticvarequal%d\n",static_var);}void{int}{inti,num;for{printf("\40:Thenumequal%d\n",num);{autointprintf("\40:Theinternalblocknumequal%d\n",num);}}}{inti,num;{printf("\40:Thenumequal%d\n",num);{staticintprintf("\40:Theinternalblocknumequal%d\n",num);}}}inta,b,c;void{inta;}void{printf("Thevalueofcisequalto}void{registerinti;inttmp=0;printf("Thesumis}#defineTRUE1#defineFALSE0#defineSQ(x)(x)*(x)voidmain(){intnum;intagain=1;printf("\40:Programwillstopifinputvaluelessthan50.\n");{printf("\40:Pleaseinputnumber==>");printf("\40:Thesquareforthisnumberis%d\n",SQ(num));}}#includevoid{intx=10;int
}printf("x=%d;y=%d\n",x,y);printf("x=%d;y=%d\n",x,y);}#defineLAG>#defineSMA<#defineEQ==voidmain(){inti=10;intj=20;if(iLAGj)printf("\40:%dlargerthan%d\n",i,j);elseif(iEQj)printf("\40:%dequalto%d\n",i,j);elseif(iSMAj)printf("\40:%dsmallerthan%d\n",i,j);printf("\40:Nosuch}#defineMAX#defineUM(x,y)(x>y)?x:y#defineMINIMUM(x,y)void{inta=10,b=20;#ifdefMAXprintf("\40:Thelargeroneis%d\n",UM(a,b));printf("\40:Theloweroneis%d\n",MINIMUM(a,b));#ifndefprintf("\40:Theloweroneis%d\n",MINIMUM(a,b));printf("\40:Thelargeroneis%d\n",UM(a,b));#undefMAX#ifdefprintf("\40:Thelargeroneis%d\n",UM(a,b));printf("\40:Theloweroneis%d\n",MINIMUM(a,b));#defineMIN#ifndefprintf("\40:Theloweroneis%d\n",MINIMUM(a,b));printf("\40:Thelargeroneis%d\n",UM(a,b));}#defineLAG>#defineSMA<#defineEQ==#include"stdio.h"void{inti=10;intj=20;if(iLAGj)printf("\40:%dlargerthan%d\n",i,j);elseif(iEQj)printf("\40:%dequalto%d\n",i,j);elseif(iSMAj)printf("\40:%dsmallerthan%d\n",i,j);printf("\40:Nosuch}&程序分析:0&0=0;0&1=0;1&0=0;{printf("\40:Thea&b(decimal)is%d\n",b);printf("\40:Thea&b(decimal)is%d}|程序分析:0|0=0;0|1=1;1|0=1;{printf("\40:Thea&b(decimal)is%d\n",b);printf("\40:Thea&b(decimal)is%d}^程序分析:0^0=0;0^1=1;1^0=1;{printf("\40:Thea&b(decimal)is%d\n",b);printf("\40:Thea&b(decimal)is%d}{}程序分析:~0=1;{printf("\40:Thea's1complement(decimal)is%d\n",b);printf("\40:Thea's1complement(hexidecimal)is%x}#include{intdriver,mode,i;floatj=1,k=1;{}}{intdriver,mode,i;floatx0,y0,y1,x1;floatj=12,k;{{}}{}outtextxy(150,40,"Howbeautifulitis!");}#definePAI3.#defineB0.809#include"graphics.h"#include"math.h"{floata;{setcolor(2);line(x0,y0,x,y);}/*Make0timenormalsizeletters*/outtextxy(10,170,"pressakey");{{setcolor(2);line(x0,y0,x,y);}{}}}#defineLEFT0#defineTOP#defineRIGHT#defineBOTTOM#defineLINES#defineMAXCOLOR15{intdriver,mode,error;intx1,y1;intintcount=0;intcolor=0;{{}}}1 1010 {intint}}#include"stdio.h"{inti,j,driver=VGA,mode=VGAHI;}#include"stdio.h"#include"conio.h"{intnum=20,i;inttop,bottom;{}}#include"stdio.h"#include"conio.h"{intdriver=VGA,mode=VGAHI;inti,num=15,top=50;intleft=20,right=50;{}}#include"math.h"#include"dos.h"#include"conio.h"#include"stdlib.h"#include"stdio.h"#include"stdarg.h"#defineMAXPTS15#definePI3.structPTS{intx,y;voidLineToDemo(void){structviewporttypevp;structPTSpoints[MAXPTS];inti,j,h,w,xcenter,ycenter;intradius,angle,step;doubleprintf("MoveTo/LineToDemonstration");getviewsettings(&vp);h=vp.bottom-vp.top;w=vp.right-xcenter=w/2;/*Determinethecenterofcircle*/ycenter=h/2;radius=(h-30)/(AspectRatio*step=360/MAXPTS;/*Determine#ofincrements*/angle=0;/*Beginatzerodegrees*/for(i=0;i<MAXPTS;++i){/*Determinecircleintercepts*/rads=(double)angle*PI/180.0;/*Convertangletoradians*/points[i].x=xcenter+(int)(cos(rads)*radiuspoints[i].y=ycenter-(int)(sin(rads)*radius*AspectRatio);angle+=step;/*Movetonextincrement*/}circle(xcenter,ycenter,radius);/*Drawboundingcircle*/for(i=0;i<MAXPTS;++i){/*Drawthecordstothecircle*/for(j=i;j<MAXPTS;++j){/*Foreachremainingintersect*/moveto(points[i].x,points[i].y);/*Movetobeginningofcord*/lineto(points[j].x,points[j].y);/*Drawthecord*/}}{intdriver,mode;{intint*pointer1,*pointer2,*pointer3;printf("pleaseinput3number:n1,n2,n3:");if(n1>n2)swap(pointer1,pointer2);if(n1>n3)swap(pointer1,pointer3);if(n2>n3)swap(pointer2,pointer3);printf("thesortednumbers}int*p1,*p2;{intp;}{intnumber[10];}{inti;}int{int*max,*min,k,l;int*p,*arr_end;if(*p>*max)max=p;elseif(*p<*min)min=p;}intarray[10];{int*p;}{intnumber[20],n,m,i;printf("thetotalnumbersis:");printf("back}int{int*p,array_end;if(m>0)}#definenmax50{intprintf("pleaseinputthetotalofnumbers:");{{*(p+i)=0;if(i==n)}while(*p==0)p++;printf("%disleft\n",*p);}{intcharprintf("pleaseinputastring:\n");printf("thestringhas%d}char*p;{{}return}#defineN5struct{charnum[6];charname[8];int}stu[N];structstudent{int{printf("\npleaseinput%dof%d\n",i+1,N);printf("num:");printf("name:");{printf("score}}}structstudent{intprintf("\nNo.NameSco1Sco2Sco3\n");{printf("%-6s%-10s",stu[i].num,stu[i].name);}}{}/*creatalist*/#include"stdlib.h"#include"stdio.h"structlist{intdata;structlist*next;typedefstructlistnode;typedefnode*link;void{linkptr,head;intnum,i;printf("pleaseinput5numbers==>\n");{if(i==4)ptr->next=NULL;elseptr=ptr-}{printf("Thevalueis==>%d\n",ptr->data);}}/*reverseoutputalist*/#include"stdlib.h"#include"stdio.h"structlist{intstructlisttypedefstructlistnode;typedefnode*link;void{linkptr,head,tail;intnum,i;printf("\npleaseinput5data==>\n");{}{printf("Thevalueis==>%d\n",ptr->data);#include"stdio.h"structlist{intdata;structlist*next;typedefstructlistnode;typedefnode*link;linkdelete_node(linkpointer,link{if(tmp==NULL)/*deletefirstnode*/returnpointer->next;{if(tmp->next->next==NULL)/*deletelastnode*/else/*deletetheothernode*/return}}voidselection_sort(linkpointer,int{linktmp,btmp;inti,min;{{if(min>tmp->next-}}printf("\40:%d\n",min);}}linkcreate_list(intarray[],int{linktmp1,tmp2,pointer;inti;{tmp2=(link)malloc(sizeof(node));}return}linkconcatenate(linkpointer1,link{linktmp;returnpointer1;}void{intlinkptr;}{inti,n;{printf("zhuhaoshide}}#include"stdio.h"{floatpeven(),podd(),dcall();floatsum;intn;{}{}{}}floatpeven(int{inti;}floatpodd(n)intn;{inti;}float(*fp)();intn;{floats;}{char*s[]={"man","woman","girl","boy","sister"};char**q;intk; }}#defineN4staticstructman{charname[20];intage; {structman*q,*p;inti,m=0;for}{char*str1[20],*str2[20],*str3[20];charswap();printf("pleaseinputthreestrings\n");printf("afterbeingsorted\n");}char*p1,*p2;{char*p[20];}
{inti,m,j,k,count;{count=0;{}}}output(longb,long{}{longinta,b,i;output(b,i);}}{char*p,s[6];intn;}{intj;for(j=2;j<=8;j++)/*jisceof{printf("\n%ld",sum);}#include"math.h"{intif(b%c==0)break;if(d%c==0)break;}}{longintm9=9,sum=9;intzi,n1=1,c9=1;}}printf("%ld,canbedividedby%d}{chara[]="acegikm";charb[]="bdfhjlnpq";charc[80],*p;inti=0,j=0,k=0;{if}structstudent{intx;charc;}}f(structstudent}{inti,a,n=1;{do}{int}}}#defineM5{intinti,j,t;}}#include"time.h"voidmain(){time_tlt;/*definealonginttimevarible*/lt=time(NULL);/*systemtimeanddate*/printf(ctime(<));/*englishformatoutput*/printf(asctime(localtime(<)));/*tranfertotm*/printf(asctime(gmtime(<)));/*tranfertoGreenwich}/*calculatetime*/#include"time.h"#include"stdio.h"{time_tstart,end;inti;{printf("\1\1\1\1\1\1\1\1\1\1\n");}printf("\1:Thedifferentis}/*calculatetime*/#include"time.h"#include"stdio.h"{clock_tstart,end;inti;doublevar;{printf("\1\1\1\1\1\1\1\1\1\1\n");}printf("\1:Thedifferentis%6.3f\n",(double)(end-}#include"time.h"#include"stdio.h"{charclock_tstart,end;time_ta,b;doublevar;inti,guess;printf("doyouwanttoyit.('y'or'n')\n");{printf("\npleaseinputnumberyouguess:\n");{printf("pleaseinputalittlesmaller.\n");{printf("pleaseinputalittlebigger.\n");}printf("\1:Ittookyou%6.3fseconds\n",var=(double)(end-start)/18.2);printf("\1:ittookyou%6.3fseconds\n\n",difftime(b,a));printf("\1\1Youareveryclever!\1\1\n\n");elseif(var<25)printf("\1\1youarenormal!\1\1\n\n");printf("\1\1youarestupid!\1\1\n\n");printf("\1\1Congradulations\1\1\n\n");printf("Thenumberyouguessis%d",i);}printf("\ndoyouwanttotryitagain?(\"yy\".or.\"n\")\n");goto}/*moneymanagementsystem*/#include"stdio.h"#include"dos.h"{FILE*fp;structdated;floatsum,=0.0;intlen,i,j=0;intc;charch[4]="",ch1[16]="",chtime[12]="",chshop[16],oney[8];pp:clrscr();gotoxy(1,2);printf("|moneymanagementsystem(C1.0)2000.03|");gotoxy(1,4);printf("|--moneyrecords--|--todaycostlist--|"); gotoxy(1,6);printf("|date:--------------||");gotoxy(1,7);printf("|||||");gotoxy(1,8);printf("|--------------||");gotoxy(1,9);printf("|thgs:------------------||");gotoxy(1,10);printf("|||||");gotoxy(1,11);printf("|------------------||");gotoxy(1,12);printf("|cost:----------||");gotoxy(1,13);printf("|
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年度家具采购合同范本
- 2024年度安置补偿及购房合同
- 2024年度专利实施许可合同的专利实施范围与许可条件
- 运载工具刹车测试仪市场环境与对策分析
- 化妆用按摩霜市场发展现状调查及供需格局分析预测报告
- 2024年度教育培训项目合作承包合同
- 2024年度林地种植基地建设承包合同
- 2024年度混凝土工程设计变更合同
- 绘画板画家用品市场发展预测和趋势分析
- 窗帘滚轴市场需求与消费特点分析
- 机房网络改造升级方案
- 桩基检测规范
- 关于统计工作的自查报告(30篇)
- 专项素养综合全练(八) 跨学科专题教学设计2024-2025学年北师大版物理八年级上册
- 五下音乐《瑶族舞曲(简谱、五线谱)》课件
- 和客户签回款协议书范本
- 2024年大学生村官考试题及参考答案
- 食品安全日管控、周排查及月调度记录表
- 物理-湖南省长沙市(炎嘚英才大联考)长郡中学2025届高三上学期月考试卷(一)试题和答案
- (高清版)AQ 2013.2-2008 金属非金属地下矿山通风技术规范 局部通风
- 2024至2030年中国特种旅游行业运行态势及市场发展潜力预测报告
评论
0/150
提交评论