摘要: #include <bits/stdc++.h> using namespace std; int rollDice() { int die1=1+rand()%6; int die2=1+rand()%6; int sum=die1+die2; cout<<"playr rolled"<<die1 阅读全文
posted @ 2023-04-27 15:15 记得关月亮 阅读(16) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; const double TINY_VALUE=1e-10; double tsin(double x) { double g=0; double 阅读全文
posted @ 2023-04-26 10:50 记得关月亮 阅读(12) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; bool symm(unsigned n) { unsigned i=n; unsigned m=0; while(i>0) { m=m*10+i 阅读全文
posted @ 2023-04-25 19:25 记得关月亮 阅读(16) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; double arctan(double x) { double sqr=x*x; double e=x; double r=0; int i=1 阅读全文
posted @ 2023-04-24 16:35 记得关月亮 阅读(14) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; double power(double x,int n) { double val=1.0; while(n--) val*=x; return 阅读全文
posted @ 2023-04-22 13:30 记得关月亮 阅读(11) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; double power(double x,int n) { double val=1.0; while(n--) val*=x; return 阅读全文
posted @ 2023-04-21 14:33 记得关月亮 阅读(10) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { int i,j; for(i=1;i<=9;i++) { for(j=1;j<=i;j++) { if(j<i){ if 阅读全文
posted @ 2023-04-20 15:28 记得关月亮 阅读(18) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { enum color{red,yellow,blue,white,black}; int i,j,k; int n=0; 阅读全文
posted @ 2023-04-19 10:13 记得关月亮 阅读(21) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { int a=18,b=0; while(a!=b) { cout<<"猜猜这个数的值为多少?(1-100)"; cin> 阅读全文
posted @ 2023-04-18 20:21 记得关月亮 阅读(14) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { cout<<2<<endl; int i,j,k,flag; i=3; while(i<=100) { j=2; k=s 阅读全文
posted @ 2023-04-17 15:54 记得关月亮 阅读(20) 评论(0) 推荐(0)