2、ge--;elseif(m1==m0&&d1600,N=6%;編寫程序,對(duì)輸入的購買金額,輸出顧客購買金額、實(shí)際支出金
額和返還金額。*/main(){intm,k;floatn;
3、printf("Pleaseinput購買金額m:");scanf("%d",&m);k=m/100;switch(k){case0:n=0;break;case1:n=0.015;break;case2:n=0.025;break;case3:n=0.035;break;case4:n=0.045;break;case5:n=0.055;break;default:n=0.06;break;}printf("%5d,%7.2f,%7.2f",m,m-n*m,m*n);/*輸出購買金額、實(shí)
際支付金額和返還金額*
4、/}===========================================CP65./*計(jì)算6個(gè)學(xué)生5門課成績,每人的平均成績。*/#includevoidmain(){inti,j,xuesheng;doublefen,mean,zongfen;for(i=1;i<=6;i++){zongfen=0;for(j=1;j<=5;j++){scanf("%lf",&fen);zongfen=zongfen+fen;}mean=zongfen/5.0;printf("xuesheng%d
5、=%lf",i,mean);}}//8.所有大于1010的四位偶數(shù),該偶數(shù)各位數(shù)字兩兩不相同。#includevoidmain(){intt,a,b,c,d;for(t=1010;t<9999;t++){if(t%2==0){a=(t/1000)%10;b=(t/100)%10;c=(t/10)%10;otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingd
6、ezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCoun
7、typartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersandd=t%10;if((a!=b)&&(a!=c)&&(a!=d)&&(b!=c)&&(b!=d)&&(c!=d))printf("%d,",t);}}}===========================================cp8/*1、編寫一個(gè)判斷一個(gè)整數(shù)是否是素?cái)?shù)的函數(shù),使用該函數(shù)編寫驗(yàn)證1000
以內(nèi)的哥德巴赫猜想是成立。(每個(gè)不小于
8、6的偶數(shù)都是兩個(gè)素?cái)?shù)之和)*/#includemain(){inti,j;for(i=6;i<=1000;i+=2)for(j=3;j<=i/2;j+=2)if(flag(j)&&flag(i-j)){printf("%d=%d+%d",i,j,i-j);break;}}flag(n)/*函數(shù)flag的功能是判斷整數(shù)n是否