- 博客(9)
- 收藏
- 关注
原创 homework-6
#include <iostream> #include <cstdlib> using namespace std; int main() { unsigned seed; cout << "请任意输入一个数" << endl; cin >> seed; srand(seed); cout << rand() << " " << rand() << " " << rand()
2020-11-13 19:53:33 88
原创 homework-7
#include<iostream> #include<cmath> using namespace std; int main() { double radius=1, s, pi = 3.14159; while(radius <= 10) { s = pi * radius * radius; radius = radius + 1; if (s >= 100)break; } return 0; }
2020-11-13 19:41:11 95
原创 homework-8
#include<iostream> #include<cmath> using namespace std; int main() { cout << "请输入一个数" << endl; int n,i=2,t; cin >> n; if (i < n) { t = n % i; if (t == 0) cout << "该数不为素数"; i = i + 1; } else cout <
2020-11-13 19:35:18 91
原创 homework-1
include<iostream> using namespace std; int main() { double a, b, c, t; cout << "请输入三个数" << endl; cin >> a >> b >> c; if (a >= b >= c) cout << a << b << c; if (a >= c >= b) cout <
2020-11-13 18:54:19 84
原创 homework-5
#include<iostream> using namespace std; int main() { cout << 1 << " " << 2 << " " << 3 << " " << 4 << " " << 5 << endl; cout << 2<< " " << 4 << " " << 6<&l
2020-11-13 18:34:00 100
原创 homework-9到10
#include <iostream> using namespace std; int main() { cout<<"老师,我暂时还不会做。"; return 0; }
2020-11-13 20:51:25 71 1
原创 homework-4
#include <iostream> using namespace std; int main() { int N, i = 0, s = 0; cout << "请输入一个整数" << endl; cin >> N; while (i <= N) { i = i++; s=s+i; } cout << s << endl; return 0; }
2020-11-13 19:13:53 78
原创 homework-3
#include <iostream> using namespace std; int main() { cout << "老师这题我不太会啊!"; return 0; }
2020-11-13 18:58:44 60
原创 homework-2
#include #include using namespace std; int main() { double a, b, c, p,s; cin >> a >> b >> c; p = (a + b + c) / 2; s = sqrt(p * (p - a) * (p - b) * (p - c)); cout << “面积等于” << s; return 0; }
2020-11-13 18:37:34 160
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人