摘要: #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 22:20 LemonSir 阅读(71) 评论(0) 推荐(0) 编辑
摘要: #include 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; cout<<jiecheng(n)<<endl; ... 阅读全文
posted @ 2017-11-06 22:19 LemonSir 阅读(54) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <iomanip> using namespace std; int main(){ double d=97.123456789012345; double dou=205.123456; double doub=123456.007; co 阅读全文
posted @ 2017-11-06 21:47 LemonSir 阅读(85) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <iomanip> using namespace std; int main(){ double a=123.456,b=3.14159,c=-3214.67; cout<<setiosflags(ios::fixed)<<setiosfl 阅读全文
posted @ 2017-11-06 21:45 LemonSir 阅读(68) 评论(0) 推荐(0) 编辑