04 2023 档案

摘要:#include <iostream> #include <iomanip> #include <cmath> using namespace std; int fun2(int m){ return m*m; } int fun1(int x,int y){ return fun2(x)+fun2 阅读全文
posted @ 2023-04-28 20:09 记得关月亮 阅读(3) 评论(0) 推荐(0) 编辑
摘要:#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 记得关月亮 阅读(9) 评论(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 记得关月亮 阅读(8) 评论(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 记得关月亮 阅读(10) 评论(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 记得关月亮 阅读(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-22 13:30 记得关月亮 阅读(6) 评论(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 记得关月亮 阅读(5) 评论(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 记得关月亮 阅读(12) 评论(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 记得关月亮 阅读(17) 评论(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 记得关月亮 阅读(10) 评论(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 记得关月亮 阅读(12) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <iomanip> using namespace std; int main() { char A,D,S,Q,ch; while(ch!='Q') { cout<<"Menu:A(dd) D(elete) S(ort) Q(uit),Se 阅读全文
posted @ 2023-04-15 18:43 记得关月亮 阅读(13) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <iomanip> using namespace std; int main() { int n; cout<<"你考试考了多少分?(0-100)"; cin>>n; if(n>=90&&n<=100) cout<<"优"; if(n>=8 阅读全文
posted @ 2023-04-14 15:24 记得关月亮 阅读(7) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <iomanip> using namespace std; int main() { char n; cout<<"现在正在下雨吗?(请输入Y或N)"; cout<<endl; cin>>n; if(n=='Y') cout<<"现在正在下 阅读全文
posted @ 2023-04-13 15:40 记得关月亮 阅读(11) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <iomanip> using namespace std; void f(int a,int b) { int c; if(b) { c=a%2; a/=2; f(a,b-1); cout<<c; } } int main() { unsi 阅读全文
posted @ 2023-04-12 15:37 记得关月亮 阅读(16) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include <iomanip> using namespace std; int main() { int sum=0; int i,j; cin>>j; char a[20]; cin>>a; for(i=0;a[i]!=0;i++) { sum=(su 阅读全文
posted @ 2023-04-11 19:41 记得关月亮 阅读(7) 评论(0) 推荐(0) 编辑
摘要:1 #include <stdio.h> 2 int main() 3 { 4 int x,y,count=0; 5 int a[20]; 6 scanf("%d",&x); 7 while(x/2) 8 { 9 a[count++]=x%2; 10 x/=2; 11 }//循环结束 12 a[co 阅读全文
posted @ 2023-04-10 20:44 记得关月亮 阅读(13) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示