⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1_2.cpp

📁 程序说明C++编的程序 可以作为学生管理系统
💻 CPP
字号:
#include<iostream>
#include <fstream>
#include"CBaseStudent.h"
using namespace std;


void fail(CStudent st2[6])

{    
    ofstream outfile2("各科不及格2.txt");
	for (int i=0;i<6;i++)
	 {  
		
		 if(st2[i].Getmaths()<60)    
		 {
			 cout<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的数学不及格"<<endl;
	         outfile2<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的数学不及格"<<endl;
		 }
		     
		 if(st2[i].Getenglish()<60)    
		 {
			 cout<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的英语不及格"<<endl;
	         outfile2<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的英语不及格"<<endl;
		 }
		 
		 if(st2[i].Getphysics()<60)    
		 {	cout<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的物理不及格"<<endl;
            outfile2<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的物理不及格"<<endl;
		 }
		 
		 if(st2[i].Getvc()<60)    
		 {	 cout<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的vc不及格"<<endl;
             outfile2<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的vc不及格"<<endl;
		 }
		 
		 if(st2[i].Getftenet()<60)    
		 {   cout<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的组成原理不及格"<<endl;
             outfile2<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的组成原理不及格"<<endl;
		 }

		 if(st2[i].Getsports()<60)    
		 {	 cout<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的体育不及格"<<endl;
		     outfile2<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的体育不及格"<<endl;
		 }

		 
		 if(st2[i].Getpolitics()<60)    
		 {    cout<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的政治不及格"<<endl;
		      outfile2<<"编号:"<<st2[i].Getnum()<<" "<<st2[i].Getname()<<"的政治不及格"<<endl;
		 }
	}
}      

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -