摘要:
产生随机数写入文件 #include <iostream> #include <time.h> #include <stdlib.h> using namespace std; int main() { srand(time(NULL)); freopen("test.txt","w",stdout 阅读全文
posted @ 2021-12-14 16:34
ShootingStar
阅读(181)
评论(0)
推荐(0)
摘要:
题目编写函数,功能是取出一串数字中的奇数。 代码 #include<iostream> #include<vector> using namespace std; vector<int> getOdd(vector<int>&a, int length) { vector<int> b; for ( 阅读全文
posted @ 2021-12-14 16:32
ShootingStar
阅读(126)
评论(0)
推荐(0)
摘要:
题目商店销售某一商品,每天公布统一的折扣discount,同时允许销售人员在销售时灵活掌握售价price,在此基础上,一次购入10件以上这,还可享受9.8折优惠。现已知当天3个销货员销售情况为: 请编写程序,计算出当日此商品的总销售款sum以及每件商品的平均售价。要求使用讲太数据成员和静态成员函数。 阅读全文
posted @ 2021-12-14 13:44
ShootingStar
阅读(422)
评论(0)
推荐(0)
摘要:
题目编写程序,通过cin创建一个含有10个正整数的vector对象,然后遍历vector的所有元素,将所有值都开方后存入另外一个vector,并输出所有开方后的值。 代码 #include<iostream> #include<vector> #include<math.h> using names 阅读全文
posted @ 2021-12-14 13:41
ShootingStar
阅读(78)
评论(0)
推荐(0)

浙公网安备 33010602011771号