test

// An highlighted block
#include<iostream>
// An highlighted block #include<iostream> using namespace
std;// Declaration use std All identifiers in the space #include<string> struct student { // structural morphology string name; int
age; int score; }; int main() { struct student stu1[3] = { {"zhang",21,84},
{"li",22,87}, {"wang",23,95} }; for (int i = 0; i < 3; i++) { cout << " full name :" <<
stu1[i].name << " Age :" << stu1[i].age << " fraction :" << stu1[i].score << endl; }
system("pause");// Let the program pause , Then press any key to continue return 0;// Indicates that the program exits normally , Return to the main program and continue to execute }

using namespace std;// Declaration use std All identifiers in the space
#include<string>

struct student {
    // structural morphology
    string name;
    int age;
    int score;
};
int main() {
    struct student stu1[3] = 
    {
        {"zhang",21,84},
        {"li",22,87},
        {"wang",23,95}
    };
    for (int i = 0; i < 3; i++)
    {
        cout << " full name :" << stu1[i].name << " Age :" << stu1[i].age << " fraction :" <<
stu1[i].score << endl;
    }

    system("pause");// Let the program pause , Then press any key to continue
    return 0;// Indicates that the program exits normally , Return to the main program and continue to execute
}
 

Technology