这几个函数编译,包含在student类里,就是写函数course里面有name和score,name是学科名字,score就是输出10到100浮点数类型的数字,name一共输出三次不重复

student{
courses: [
{
name: '数学',
score: '{{floating(10, 100, 2)}}'
},
{
name: '英语',
score: '{{floating(10, 100, 2)}}'
},
{
name: 'C++',
score: '{{floating(10, 100, 2)}}'
}
],

friends: [
'{{repeat(3,5)}}',
{
id: '{{index()}}',
name: '{{firstName()}}*{{surname()}}',


#include<iostream>
#include<algorithm>
#include<time.h>
#include<string>
#include <iomanip>
using namespace std;
class student
{
public:
    void course()
    {
        float grade;
        string name[3] = { "数学","英语","C++" };
        for (int i = 0; i < 3; i++)
        {
            grade = (rand() % 9000 + 1000) / 100.0;
            cout << name[i] << " " <<fixed<< setprecision(2) << grade << endl;
        }
    }
};
int main()
{
    srand((unsigned int)time(NULL));
    student s;
    s.course();
    return 0;
}