摘要: #include <iostream> using namespace std; int age(int num){ int a; if(num==1) a=10; else a=age(num-1)+2; return a; } int main(){ cout<<age(5)<<endl; re 阅读全文
posted @ 2017-11-06 19:00 羿龙 阅读(62) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int jiecheng(int num){ int f; if(num==1) f=1; else f=jiecheng(num-1)*num; return f; } int main(){ int n=5; co 阅读全文
posted @ 2017-11-06 18:51 羿龙 阅读(72) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main(){ double d=97.123456789012345; double dou=205.123456; double doub=123456.007; cout<<d<<endl; cout<<dou<<endl; cout<<doub<<e... 阅读全文
posted @ 2017-10-16 22:47 羿龙 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main(){ double a=123.456,b=3.14159,c=-3214.67; cout<<setiosflags(ios::fixed)<<setiosflags(ios::right)<<setprecision(2); cout<<setw(10)<<a<<endl; cout<... 阅读全文
posted @ 2017-10-16 22:42 羿龙 阅读(101) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main(){ int i,j; for(i=1;i=i;j--){ cout using namespace std; int main(){ for(int i=1;i<=9;i++){ for(int j=1;j<=i;j++){ cout<<j<<"*"<<i<<... 阅读全文
posted @ 2017-10-12 20:02 羿龙 阅读(136) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main(){ int i,j; for(i=1;i using namespace std; int main(){ int i,j; for(i=1;i=i;j--){ cout<<"*"; } cout<<endl; } } ... 阅读全文
posted @ 2017-10-12 19:57 羿龙 阅读(169) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main(){ int i,j; for(i=1;i<=60;i++){ for(j=1;j<=50;j++){ cout<<"*"; } cout<<endl; } } 阅读全文
posted @ 2017-10-12 19:47 羿龙 阅读(150) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;int main(){cout<<(6&3)<<endl; return 0;} 阅读全文
posted @ 2017-09-25 19:54 羿龙 阅读(81) 评论(4) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;int main(){short int s=3;s+=4; cout<<"s="<<s<<endl;return 0;} 阅读全文
posted @ 2017-09-25 19:53 羿龙 阅读(77) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;int main(){int a=3,b;b=a++;cout<<"a="<<a<<", b="<<b;return 0;} #include <iostream>using namespace std;int main( 阅读全文
posted @ 2017-09-25 19:51 羿龙 阅读(125) 评论(0) 推荐(0) 编辑