例子100c實(shí)務(wù)罕見資源大集合_第1頁(yè)
例子100c實(shí)務(wù)罕見資源大集合_第2頁(yè)
例子100c實(shí)務(wù)罕見資源大集合_第3頁(yè)
例子100c實(shí)務(wù)罕見資源大集合_第4頁(yè)
例子100c實(shí)務(wù)罕見資源大集合_第5頁(yè)
已閱讀5頁(yè),還剩59頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

進(jìn)入 程序分析:可填在百位、十位、個(gè)位的數(shù)字都1、2、3、4。組成所有的排列后再去{inti,j,k; for{if(i!=k&&i!=j&&j!=k) /*i、j、k三位互不相同*/}}題目:企業(yè)的獎(jiǎng)金根據(jù)利潤(rùn)提成。利潤(rùn)(I)低于或等于10萬元時(shí),獎(jiǎng)金可提10%;利潤(rùn)

于10萬元,低于20萬元時(shí),低于10萬元的部分按10%提成,高于10萬元的部分,成7.5%;20萬到40萬之間時(shí),高于20萬元的部分,可提成5%;40萬到60萬之間{longint elseelseif(i<=400000)elseif(i<=600000)elseif(i<= }{longintfor{x=sqrt(i+100); /*x為加上100后開方后的結(jié)果*/ }}{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;/*前兩個(gè)月加起來賦值給第三個(gè)月*/f2=f1+f2;/*前兩個(gè)月加起來賦值給第三個(gè)月*/}}{intm,i,k,h=0,leap=1;{k=sqrt(m+1);}}printf("\nThetotalis}{intprintf("'waterflower'numberis:");{{}}}如果這個(gè)質(zhì)數(shù)恰等于/*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是一個(gè)數(shù)字。例如2+22+222 {inta,n,count=1;longintsn=0,tn=0;printf("pleaseinputaandn\n");{}}找出1000以內(nèi)的所有完數(shù)。{staticintk[10];inti,j,n,s;{{{}}{printf("%disawanshu",j);}}}{intn;{sn=sn+2*hn;/*n次落地時(shí)共經(jīng)過的米數(shù)*/hn=hn/2;/*第n次反跳高度*/}printf("thetotalofroadis%f\n",sn);printf("thetenthis%fmeter\n",hn);}下{intday,x1,x2;{x1=(x2+1)*2;/*2天桃子數(shù)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)/*個(gè)位等于萬位并且十位等于千位*/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);/*定位函數(shù)*/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等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論