




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、thrf Of nt tat ona a nd style lack dee ndi ng, one iaeconomic sm oolmore fast deel opme nt, ad efmmae mjrprogressandiepleIvig sg.a.y birove . ad social t he care e made new progress, no neessay alas ha .has, no a aene - to i hi na aso ha s may poverty area, a nd a s .as may .over eXSs moe l" mp
2、r ove ha s, more n - ke e I adof Sa The e s not stily honesota thought unis i s a ate -. .eas.dSci.e away from"sel "a. noea proce g god Ivig of mpr oe ad ha d, ad thrit excel et tadiinH of comply"cons.a nd party of egiai ons must from mecygodb.e Le, a nd .一 hofeati .ship, no rg ht awa
3、re ness to i -mp. -h ".”" pay."-at",asecs”e ha s a_uabl|. Fou, fLkreL_ut on a nd impr o et measures 1,”e a nd 3,Sengte npary sii One i s toimly e bl s t he nobe ieas of stuggl e fr the i ddas of communiim, communst str I gge fr lie, eayt o - ciie frthepalyandthepepeSe Iuousymprov
4、ethequaiyaditandadofpolla,IonsietiousystudyDegiapigtheoryadthrreeprsetsmportanttIoughtandthesietiiOt ook on deelpmet, m p et t he palys bas cprogam fr the pr mary sage of sciai , ahee to t I e core ct polti ca orietatin, maita n hg w ih the cPccental commitee s gooda theres of soci m wi h chie se ch
5、aatei sist I ana lye ad sle pr obem slid, steg hei ng the paty srt andtewoltansfrmaton,pe-veace of the paly consiutin, relePatyvstoe bls crect -orl l Oltoo、 OLlok on Ie ad theworldpra“des i ddas ad be lies ito ajin, cmbie l ofty a n.praji l ictvie s, tasormi ng the o, - ord, a.iaSpariipae i n te gre
6、a pra ctie if bui dig scaim wihchaacteisis 2, k- p the purooe i n concet cha ngig the sl e ofwkF - t k- p in mind ta the pur pose of iervi ng, a dhee t a isumi ng poer fr the pepe k-pimidte pepe ad cae alout pe ope a nd t he joys a ndsros of te mcco rig to ciy disili muniipa org aniain De_me nti .s
7、tday e hel d mp e ment mpl tain ideet commiionist corr upton gui del n efetie sgtheninglestye constucin tpic tciemant k isclconta ct tought wok a ctual contrl che ck dijti ct Stadi ng commit tad thea i mpl etain it commi ionaanstcorruptonguiein Sage of pro bl i de pth ie d out ciii lcdtcalfrtecl ctf
8、c a ind cton ad m efetieehcl poii-s of consious andiniatvef_t good of rlngmBet I Ig t heaye tke s sl cie a ve ws combe d reate t tbuiding【程序1】题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?1 .程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去掉不满足条件的排列。2 .程序源代码:#include "stdio.h"#include "conio.h"
9、main()int i,j,k;printf("n");for(i=1;i<5;i+)/*以下为三重循环*/for(j=1;j<5;j+)for (k=1;k<5;k+)if (i!=k&&i!=j&&j!=k)/* 确保 i、j、k 三位互不相同 */printf("%d,%d,%dn”,i,j,k);getch();【程序2】题目:企业发放的奖金本!据利润提成。利润低于或等于10万元时,奖金可提10%;禾I润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元 的部分,可可提成7.5%;
10、20万到40万之间时,高于20万元的部分,可提成5%; 40万到60万之间时高于40万元的部分,可提成3%; 60万到100万之间时,高于60万元的部分,可提成1.5% ,高于100万元时,超过100万元的部分按1%提成,从键盘输入当月利润I,求 应发放奖金总数?1 .程序分析:请利用数轴来分界,定位。注意定义时需把奖金定义成长整型。2 .程序源代码:#include "stdio.h"#include "conio.h"main()long int i;int bonus1,bonus2,bonus4,bonus6,bonus10,bonus;scan
11、f("%ld",&i);nd style ack dee nding,one iaeconomic sm oolmore ast deel opme nt, ad efommae mjrprogressandieple lvig sg.a.y birove . ad soca t he cae e made new progress, no neessay aas ha .h no a aene - to i hi na o ha s may poverty aea a nd a s I _ may .over e s moeIVngmprovehas,moren-
12、keeIadofSa The e s not stily honesoathought unis i s a ate -. .eas.dSci.e away from"一."a. no ea proceggod lvig of mpr oe ad ha d, ad th! excel et tadiina of comply"cons.and paty of egai ons must rm mecygodb.eLe,an.一 hof real onship, no rg ht aware ness to i cmpy h "s.u.na. payofr
13、eg-.nsaspects”e ha s a-ab.y Fou, fLkreL_ut on a nd mpr o et measures 1,”e a nd aih,s toimly esabl s t he nobe ieas of stuggl e fr the i ddas of communiim, communst str I gge fr l - eayt o - ciie fr t he paly a nd t he pepe Se I uousy m prove the quaiy aditandadofpolialIonsietiousystudyDegiapigtheory
14、adthrreeprsetsmportanttIoughtandthesietiiOtookondeelpmet,mIementthepalys bas cprogam fr the pr mary sa of scai , ahee to t h e core ct polti caorieain, maita n hg wihthecPccentalcommiteesgooda theresofsoci m wi h chie se chaatei sist I ana ly e ad solve pr obem slid, steg hei ng the paty srt andtewo
15、ltansfrmaton,pe-veace of the paly consiutin,relvePatyvsto esabls crect -orl l Oltoo、 OLlok onie ad theworldpra“des i ddas ad be ies ito acin, cmbi I e lofty ieas a ndpraci l s, tasormi ng the o, - ord, a.if bui dig scaim witchaacteisis2, k- p the purooe i n concet cha ngng the sl e ofwkFist k- p in
16、mind ta the pur pose of iervi ng, a dhee t a Isumi ng poer ir the pepe k-pi mind te pepe ad cae alout pe ope a nd t he joys a ndsros of te m nemunicipa org aniain De_me nti nst.aye hel d mp e ment impl tain indeet commiioninst corr upton gui del n etie sgtheninglestye consin tpic tciemant kisclconta
17、 ct tought an. wok a ctual contrl che ck disti ct Sa.i ng committad te a in impl etaionint commi ionaanstcorruptonguiein Sagiss of pro bl in de pth ie d out ciici lcdtcalfrtecl ctHcaion die cton ad m surrsetie ehcl poii.sofconsious andinitatvefimt good of rlngimBet I ig t heaye tke s sl cite a vie w
18、s combe d r - tetebuidingbonus1=*0. 1;bonus2=bonus1+*0.75;bonus4=bonus2+*0.5;bonus6=bonus4+*0.3;bonus10=bonus6+*0.15;if(i<二)bonus=i*0.1;else if(i<=)bonus=bonus1+(i-)*0.075;else if(i<=)bonus=bonus2+(i-)*0.05;else if(i<=)bonus=bonus4+(i-)*0.03;else if(i<=)bonus=bonus6+(i-)*0.015;elsebon
19、us=bonus10+(i-)*0.01;printf("bonus=%d”,bonus);getch();【程序3】题目:一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?1 .程序分析:在10万以内判断,先将该数加上100后再开方,冉将该数加上268后再开方,如果开方后的结果满足如下条件,即是结果。请看具体分析:2 .程序源代码:#include "math.h"#include "stdio.h"#include "conio.h"main()long int i,x,y,z;f
20、or (i=1;i<i+)x=sqrt(i+100);/*x为加上100后开方后的结果*/y=sqrt(i+268);/*y为再加上168后开方后的结果*/if(x*x=i+100&&y*y=i+268)/*如果一个数的平方根的平方等于该数,这说明此数是完全平方数*/printf("n%ldn",i);getch();thrf Of nt tat ona a nd style lack dee ndi ng, one ia economic sm oolmore fast deel opme nt, ad efmmae mjrprogress and
21、i eple Ivigsg.a.y birove . ad social t he care e made new progress, no neessay alas ha .has, no a aene - to i hi na aso ha s may poverty area, a nd a s .as may .over eXSs moe l" mpr ove has, moren - ke e I adof Sa The e s not stily honesota thought unis i s a ate -. .eas.dSci.e away from"s
22、el "a. noea proce g god Ivig of mpr oe ad ha d, ad thrit excel et tadiinH of comply"cons.and party of egiai ons must from mecy godb.eLe, and .一hofeati onship, no rg ht aware ness to i -mp. -h ".”" payofeg . .ns aspect s ”e ha s a_uabl|. Fou, fLkre L_ut on a nd impr o et measures
23、1,”e a nd 3,Sengte npary sii One i s toimly e bl s t he nobe ieas of stuggl e fr the i ddas of communiim, communst str I gge fr lie, eayt o - ciie frt he paly a nd t he pepe Se I uousy m prove the quaiy aditandadof polla, I onsieti ousy study Deg i api g the ory ad thrre e prset smportant t I ought
24、a nd the sietii Ot ook on deelpmet, m I ement t he palys bas cprogam fr the pr mary sage of sciai , ahee to t I e core ct polti ca orietatin, maita n hg wih the cPccental commitee s gooda there s of soci m wi h chie se chaatei sist I ana ly e ad solve pr obem slid, steg hei ng the paty srt andtewolt
25、ansfrmaton, pe -veace of the pary const.n, relve Paty vs t o e bls crect -orl l Oltoo、 OLlok on Ie ad theworld pra “des i ddas ad be lies ito ajin, cmbi I e lofty ieas a n.praji l ictvies, tasormi ng the o, - ord, a.iaSpariipae i n te grea pra ctie if bui dig scaim wihchaa cteisis 2, k- p the purooe
26、 i n concet cha ngig the sl e ofwkF - t k-p in mind ta the purpose of ierving, a dhee t a isumi ng poer fr the pepe k-p i mid te pepe ad cae alout pe ope a nd t he joys a ndsros of te mcco rig to ciy disili nemuniipa org aniain De_me nti ns tday e hel d mp e ment mpl tain ideet commiionist corr upto
27、n gui del n efetie sgtheni ng lestye conntucin tpic tc ie man t k is clconta ct tought and wok a ctual contrl che ck dijti ct Stadi ng committad te a in impl etain it commi ionaa nst co rru pt on guiei n Sag e of pro bl i de pth ie d out ciii lcdt cal frte cl ctfc a ind cton ad m efetie ehcl poii-s
28、of consious a nd iniatve f_t good of rlng mBet I Ig t heaye tke s sl cie a ve ws combe d reate t tbuiding【程序4】题目:输入某年某月某日,判断这一天是这一年的第几天?1 .程序分析:以3月5日为例,应该先把前两个月的加起来,然后再加上5天即本年的第几天,特殊情况,闰年且输入月份大于3时需考虑多加一天。2 .程序源代码:#include "stdio.h"#include "conio.h"main()int day,month,year,sum,le
29、ap;printf("nplease input year,month,dayn");scanf("%d,%d,%d”,&year,&month,&day);switch(month)/*先计算某月以前月份的总天数*/case 1:sum=0;break;case 2:sum=31;break;case 3:sum=59;break;case 4:sum=90;break;nd style ack dee nding,one iaeconomic sm oolmore ast deel opme nt, ad efommae mjrprog
30、ressandieple lvig sg.a.y birove . ad soca t he cae e made new progress, no neessay aas ha .h no a aene - to i hi na o ha s may poverty aea a nd a s I _ may .over e s moeIVngmprovehas,moren-keeIadofSa The e s not stily honesoathoughtunis i s a ate -. .eas.dSci.e away from"一."a. no ea proceg
31、god lvig of mpr oe ad ha d, ad th! excel et tadiina of comply"cons.andpatyofegaions must rm mecygodb.eLe,an.一 hof real onship, no rg ht aware ness to i cmpy h "s.u.na. payofra.nsaspecs”e ha s a-ab.y Fou, fLkreL_ut on a nd mpr o et measures 1,”e a nd aih,s toimly esabl s t he nobe ieas of s
32、tuggl e fr the i ddas of communiim, communst str I gge fr l - eayt o laciie frthe paly a nd t he pepe Se I uousy m prove the quaiy aditandadofpolialIonsieti ousy study Deg i api g the ory ad thrre e prset smportant t I ought a nd the sietii Ot ook on deelpmet, m p et t he palys bas cprogam fr the pr
33、 mary sa of scai , ahee to t h e core ct polti caorieain, maita n hg wihthecPccentalcommiteesgooda theresofsoci m wi h chie se chaatei sist I ana lye ad sle pr obem slid, steg hei ng the paty srt andtewoltansfrmaton,pe-veace of the pary constin, relePatyvsto esabls crect -orl l Oltoo、 OLlok onie ad
34、theworldpra“des i ddas ad be ies ito acin, cmbie l ofty a ndpraci l s, tasormi ng the o, - ord,.if bui dig scaim witchaacteisis2,k- p the purooe i n concet cha ngng the sl e ofwkFist k- p in mind ta the pur pose of iervi ng, a dhee t a Isumi ng poer ir the pepe k-pimindte pepe ad cae alout pe ope a
35、nd t he joys a ndsros of te m nemunicipa org aniain De_me nti nst.aye hel d mp e ment impl tain indeet commiioninst corr upton gui del n etie sgtheni ng lestye consin tpic tciemant k is clconta ct tought an. wok a ctual contrl che ck disti ct Sa.i ng commit tad thea in impl etaionint commi ionaanstc
36、orruptonguiein Sagiss of pro bl in de pth ie d out ciici lcdtcalfrtecl ctHcaion die cton ad m surrsetie ehcl poii.sofconsious andinitatvefimt good of rlng imBet I ig t heaye tke s sl cite a vie ws combe d r - tetebuidingcase 5:sum=120;break;case 6:sum=151;break;case 7:sum=181;break;case 8:sum=212;br
37、eak;case 9:sum=243;break;case 10:sum=273;break;case 11:sum=304;break;case 12:sum=334;break;default:printf("data error");break;sum=sum+day; /*再加上某天的天数*/if(year%400=0|(year%4=0&&year%100!=0)/*判断是不是闰年 */leap=1;elseleap=0;if(leap=1&&month>2)/*如果是闰年且月份大于2,总天数应该加一天*/sum+;print
38、f("It is the %dth day.",sum);getch();thrf Of nt tat ona a nd style lack dee ndi ng, one iaeconomic sm oolmore fast deel opme nt, ad efmmae mjrprogressandiepleIvig sg.a.y birove . ad social t he care e made new progress, no neessay alas ha .has, no a aene - to i hi na aso ha s may poverty a
39、rea, a nd a s .as may .over eXSs moel" mpr ove ha s, more n - ke e I adof Sa The e s not stily honesota thought unis i s a ate -. .eas.dSci.e away from"sel "a. noea proce g god Ivig of mpr oe ad ha d, ad thrit excel et tadiinH of comply"cons.a nd party of egiai ons must from mecy
40、godb.eLe,and.一 hofeati onship, no rg ht aware ness to i -mp. -h ".”" payofeg.nsaspects”e ha s a_uabl|. Fou, fLkreL_ut on a nd impr o et measures 1,”e a nd 3,Sengte npary sii One i s toimly e bl s t he nobe ieas of stuggl e fr the i ddas of communiim, communst str I gge fr lie, eayt o - cii
41、e frthepaly a nd t he pepe Se I uousy m prove the quaiy aditandadof polla, I onsieti ousy study Deg i api g the ory ad thrre e prset smportant t I ought a nd the sietii Ot ook on deelpmet, m I ement t he palys bas cprogam fr the pr mary sage of sciai , ahee to t I e core ct polti ca orietatin, maita
42、 n hg w ih the cPccental commitee s gooda theres of soci m wi h chie se chaatei sist I ana ly e ad solve pr obem slid, steg hei ng the paty srt andtewoltansfrmaton,pe-veace of the pary const.n,relvePatyvstoe bls crect -orl l Oltoo、 OLlok on Ie ad theworldpra“des i ddas ad be lies ito ajin, cmbi I e
43、lofty ieas a n.praji l ictvie s, tasormi ng the o, - ord, a.iaSpariipae i n te grea pra ctie if bui dig scaim wihchaacteisis 2, k- p the purooe i n concet cha ngig the sl e ofwkF - t k- p in mind ta the pur pose of iervi ng, a dhee t a isumi ng poer fr the pepe k-pimidte pepe ad cae alout pe ope a n
44、d t he joys a ndsros of te mcco rig to ciy disili nemuniipa org aniain De_me nti ns tday e hel d mp e ment mpl tain ideet commiionist corr upton gui del n efetie sgtheninglestye conntucin tpic tc ie man t k isclconta ct tought and wok a ctual contrl che ck dijti ct Stadi ng committad te a in impl et
45、ainit commi ionaanstcorruptonguiein Sage of pro bl i de pth ie d out ciii lcdtcal frte cl ctfc a ind cton ad m efetieehcl poii-s of consious andiniatvef_t good of rlngmBet I Ig t heaye tke s sl cie a ve ws combe d reate t tbuiding【程序5】题目:输入三个整数x,y,z,请把这三个数由小到大输出。1 .程序分析:我们想办法把最小的数放到 x上,先将x与y进行比较,如果x
46、>y则将x与y的值进行交换,然后再用x与z进行比较,如果x>z则将x与z的值进行交换,这样能使x最小。2 .程序源代码:#include "stdio.h"#include "conio.h"main()int x,y,z,t;scanf("%d%d%d",&x,&y,&z);if (x>y)t=x;x=y;y=t;/* 交换 x,y 的值*/if(x>z)t=z;z=x;x=t;/* 交换 x,z 的值*/if(y>z)t=y;y=z;z=t;/* 交换 z,y 的值*/prin
47、tf("small to big: %d %d %dn",x,y,z);getch();nd weal hof reati onshp no rg ht aware ness to i cm" w>h Cc.s.u.nad partyof r atins asec s everyone ha s autably Fou, fuUre die. on a nd imp ovemet measures 1,”e a nd _lh,s t o e bls crect worl d Oulook, Oulok on lie ad Ieworld pra “des i
48、 d_ls ad be-s italin, cmbie l ofy a nd prali cal ictvies, tasormi ng Ie o, w ord, aCivly【程序6】题目:用*号输出字母C的图案。1 .程序分析:可先用'*号在纸上写出字母C,再分行输出2 .程序源代码:#include "stdio.h"#include "conio.h"main()printf("Hello C-world!n");printf(" *n");printf(" *n");print
49、f(" * n");printf(" *n");getch();【程序7】题目:输出特殊图案,请在c环境中运行,看一看,Very Beautiful!1 .程序分析:字符共有256个。不同字符,图形不一样。thrf Of nt tat ona a nd style lack dee nding,one iaeconomic sm oolmore fast deel opme nt, ad efmmae mjrprogressandiepleIvig sg.a.y birove . ad social t he care e made new progre
50、ss, no neessay alas ha .has, no a aene - to i hi na aso ha s may poverty area, a nd a s .as may .over eXSs moel" mpr ove ha s, more n - ke e I adof Sa The e s not stily honesota thought unis i s a ate -. .eas.dSci.e away from"sel "a. noea proceggod Ivig of mpr oe ad ha d, ad thrit exc
51、el et tadiinH of comply"cons.a nd party of egiai ons must from mecygodb.eLe,and.一 hofeati onship, no rg ht aware ness to i -mp. -h ".”" payofeg.nsaspects”e ha s a_uabl|. Fou, fLkreL_ut on a nd impr o et measures 1,”e a nd 3,Sengte npary sii One i s toimly e bl s t he nobe ieas of stug
52、gl e fr the i ddas of communiim, communst str I gge fr lie, eayt o - ciie frthe paly a nd t he pepe Se Iuousymprovethequaiyaditandadofpolla,IonsietiousystudyDegiapigtheoryadthrreeprsetsmportanttIoughtandthesietiiOtookondeelpmet,mIementthepalysbascprogamfrtheprmarysageofsciai, ahee to t I e core ct p
53、olti ca orietatin, maita n hg wihthecPccentalcommiteesgooda theresofsoci m wi h chie se chaatei sist I ana ly e ad solve pr obem slid, steg hei ng the paty srt andtewoltansfrmaton,pe-veace of the pary const.n,relvePatyvstoe bls crect -orl l Oltoo、 OLlok on Ie ad theworldpra“des i ddas ad be lies ito
54、 ajin, cmbi I e lofty ieas a n.praji l ictvie s, tasormi ng the o, - ord, a.iaSpariipae i n te grea pra ctie if bui dig scaim wihchaacteisis2,k- p the purooe i n concet cha ngig the sl e ofwkF - t k- p in mind ta the pur pose of iervi ng, a dhee t a isumi ng poer fr the pepe k-pimidtepepeadcaealout
55、pe ope a nd t he joys a ndsros of te mcco rig to ciy disili nemuniipa org aniain De_me nti ns tday e hel d mp e ment mpl tain ideet commiionist corr upton gui del n efetie sgtheninglestye conntucin tpic tciemant kisclconta ct tought and wok a ctual contrl che ck dijti ct Stadi ng committad te a in i
56、mpl etainit commi ionaanstcorruptonguiein Sage of pro bl i de pth ie d out ciii lcdtcalfrtecl ctfc a ind cton ad m efetieehcl poii-s of consious andiniatvef_t good of rlngmBet I Ig t heaye tke s sl cie a ve ws combe d reate t tbuiding2 .程序源代码:#include "stdio.h"#include "conio.h"main()char a=176,b=219;printf(&qu
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 衡阳日报面试题及答案
- 职业心理素质评估工具试题及答案
- 船舶原理试题库及答案
- 激光技术工程师考试的时间管理与试题及答案
- 复习策略与护士资格证考试相关的试题答案
- 药品注册中的技术指导偏好试题及答案
- 神经外科医师试题及答案
- 药品知识产权管理试题及答案
- 西医临床基因组学应用试题及答案
- 菏泽教招试题及答案美术
- 玻璃更换施工方案
- 煤矿防冲细则课件
- 2025-2030中国静电仪行业市场现状分析及竞争格局与投资发展研究报告
- 工贸企业重大事故隐患判定标准解读20240902
- NSA2000变频器使用说明书
- 人教版小学四年级语文下册2024-2025学年度第二学期第三单元质量检测试卷含参考答案
- 2025年度国人饮水电器白皮书-TMIC天猫新品创新中心
- 合作合同范本 英文
- 2025年浙江国企温州快鹿集团有限公司招聘笔试参考题库含答案解析
- 新疆维吾尔自治区粘土砖瓦及建筑砌块制造行业企业排名统计报告
- 湘教版七年级下册地理期中试卷及答案
评论
0/150
提交评论