摘要: 1、输入球的中心点和球上某一点的坐标,计算球半径和体积。 #include <iostream> #include <cmath> using namespace std; int main() { int x0, y0, z0, x, y, z; cout << "请输入球心坐标:"; cin > 阅读全文
posted @ 2020-03-18 23:15 AlsoRan 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 1、某人有8 角的邮票5 张,1 元的邮票4 张,1 元8 角的邮票6 张,用这些邮票中的一张或若干张可以得到多少中不同的邮资? #include <iostream> #include <set> using namespace std; int main() { set<int> s; int 阅读全文
posted @ 2020-03-18 20:47 AlsoRan 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1、请输入高度 h,输入一个高为 h,上底边长为 h的等腰梯形(例如 h=4,图形如下)。 **** ****** ******** ********** #include <iostream> using namespace std; int main() { int h; while(cin > 阅读全文
posted @ 2020-03-18 18:25 AlsoRan 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 1、编写程序,计算下列分段函数 y=f(x)的值。 y = -x + 2.5, 0 <= x < 2 y = 2 - 1.5 (x - 3) (x - 3), 2 <= x < 4 y = x / 2 - 1.5, 4 <= x < 6 #include <iostream> using names 阅读全文
posted @ 2020-03-18 17:55 AlsoRan 阅读(187) 评论(0) 推荐(0) 编辑