📌  相关文章
📜  在线 c++ 到 c 转换器 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:48.151000             🧑  作者: Mango

代码示例3
#include 
using namespace std;
struct DiemGk{
    int MSSV, diem;
    DiemGk *next;
};
int main()
{
    int n, Dmin;
    cin>>n>>Dmin;
    DiemGk *newNode;
    newNode = new(DiemGk);
    DiemGk *head = newNode;
    int i, k = 0;
    for(i=1; i>newNode->MSSV>>newNode->diem;
        if(newNode->diem >= Dmin) k++;
        newNode->next = new(DiemGk);
        newNode = newNode->next;
    }
    cin>>newNode->MSSV>>newNode->diem;
    if(newNode->diem >= Dmin) k++;
    newNode->next = NULL;
    cout<<"Tong so sinh vien tham du ky thi cuoi ky: "<diem >= Dmin) cout<MSSV<<" "<diem<<"\n";
        head = head->next;
    }
    return 0;
}