"> " />
欢迎来到天天文库
浏览记录
ID:35940657
大小:364.00 KB
页数:65页
时间:2019-04-26
《c++编程实例100例》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、实用文案输入一个整数将各位征税反转后输出#includeusingnamespacestd;intmain(){intn,right_digit,newnum=0;cout<<"Enterthenumber:";cin>>n;cout<<"thenumberinreverssrderis:";do{right_digit=n%10;cout<2、>usingnamespacestd;intmain(){inti=1,sum=0;while(i<=10){sum+=i;i++;}cout<<"sunm="<usingnamespacestd;intmain(){inti=1,sum=0;do{sum+=i;i++;}while(i<=10);标准文档实用文案cout<<"sum="<usingname3、spacestd;intmain(){longinti;intbouns1,bouns2,bouns4,bouns6,bouns10,bouns;scanf("%d",&i);//%ld表示这个数据的类型是longint长整形//&i表示i的地址,及输出的是i的值bouns1=100000*0.1;bouns2=bouns1+10000090.75;bouns4=bouns2+200000*0.5;bouns6=bouns4+200000*0.3;bouns10=bouns6+400000*0.15;if(i<4、=100000)bouns=i*0.1;elseif(i<=200000)bouns=bouns1+(i-100000)*0.075;elseif(i<=400000)bouns=bouns2+(i-200000)*0.05;elseif(i<=600000)bouns=bouns4+(i-400000)*0.03;elseif(i<=10000000)bouns=bouns6+(i-600000)*0.15;elsebouns=bouns10+(i-1000000)*0.01;printf("bouns=%d5、",bouns);//输出一个数据a为整形数据。}星期intday;cout<<"输入数:";cin>>day;switch(day){case0:cout<<"sunday"<6、<"friday"<usingnamespacestd;intmain(){intx,y;cout<<"Enterxandy:";cin>>x>>y;if(x!=y)if(x>y)cout<<"x>y"<7、<"xusingnamespacestd;intmain(){intyear;标准文档实用文案boolisLeapYear;cout<<"Entertheyear:";cin>>year;isLeapYear=((year%4==0&&year%100!=08、9、year%400==0));if(isLeapYear)cout<10、pyear"<Intma
2、>usingnamespacestd;intmain(){inti=1,sum=0;while(i<=10){sum+=i;i++;}cout<<"sunm="<usingnamespacestd;intmain(){inti=1,sum=0;do{sum+=i;i++;}while(i<=10);标准文档实用文案cout<<"sum="<usingname
3、spacestd;intmain(){longinti;intbouns1,bouns2,bouns4,bouns6,bouns10,bouns;scanf("%d",&i);//%ld表示这个数据的类型是longint长整形//&i表示i的地址,及输出的是i的值bouns1=100000*0.1;bouns2=bouns1+10000090.75;bouns4=bouns2+200000*0.5;bouns6=bouns4+200000*0.3;bouns10=bouns6+400000*0.15;if(i<
4、=100000)bouns=i*0.1;elseif(i<=200000)bouns=bouns1+(i-100000)*0.075;elseif(i<=400000)bouns=bouns2+(i-200000)*0.05;elseif(i<=600000)bouns=bouns4+(i-400000)*0.03;elseif(i<=10000000)bouns=bouns6+(i-600000)*0.15;elsebouns=bouns10+(i-1000000)*0.01;printf("bouns=%d
5、",bouns);//输出一个数据a为整形数据。}星期intday;cout<<"输入数:";cin>>day;switch(day){case0:cout<<"sunday"<6、<"friday"<usingnamespacestd;intmain(){intx,y;cout<<"Enterxandy:";cin>>x>>y;if(x!=y)if(x>y)cout<<"x>y"<7、<"xusingnamespacestd;intmain(){intyear;标准文档实用文案boolisLeapYear;cout<<"Entertheyear:";cin>>year;isLeapYear=((year%4==0&&year%100!=08、9、year%400==0));if(isLeapYear)cout<10、pyear"<Intma
6、<"friday"<usingnamespacestd;intmain(){intx,y;cout<<"Enterxandy:";cin>>x>>y;if(x!=y)if(x>y)cout<<"x>y"<7、<"xusingnamespacestd;intmain(){intyear;标准文档实用文案boolisLeapYear;cout<<"Entertheyear:";cin>>year;isLeapYear=((year%4==0&&year%100!=08、9、year%400==0));if(isLeapYear)cout<10、pyear"<Intma
7、<"xusingnamespacestd;intmain(){intyear;标准文档实用文案boolisLeapYear;cout<<"Entertheyear:";cin>>year;isLeapYear=((year%4==0&&year%100!=0
8、
9、year%400==0));if(isLeapYear)cout<10、pyear"<Intma
10、pyear"<Intma
此文档下载收益归作者所有