选择困难症
明天6级,要填健康状况表,包含最近14天的体温。乱写都不知道写哪个好orz,所以想随机一波数据出来^^
#include <iostream>
#include <random>
using namespace std;
int main()
{
std::random_device rd;
//int cnt = 0;
//for (int i = 0; i < 10000000; i++) //下面的循环是用来判断随机数的奇偶概率的
//{
// if (rd() & 1)
// cnt++;
//}
//cout << cnt / 100000.0 << "%" << endl;
for (int i = 1; i <= 14; i++)
{
printf("第%d天的体温为: %0.1f\n", i, (rd() % 10 + 360) / 10.0);
}
return 0;
}