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

📄 1_4.cpp

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

void totalfail(CStudent st4[6])

{   ofstream outfile4("不及格统计4.txt");
	for (int i=0;i<6;i++)
	{    int j=0;
		 
		 if(st4[i].Getmaths()<60)    
		{
		     j++;
		 }
	     
		 if(st4[i].Getenglish()<60)    
		 {
		     j++;
		 }

	    if(st4[i].Getphysics()<60)    
		 {
			 j++;
		 }

		if(st4[i].Getvc()<60)    
		 {
		     j++;
		 }      

       if(st4[i].Getftenet()<60)    
		 {
		     j++;
		 }

	
	   if(st4[i].Getsports()<60)    
		 {	
		     j++;
		 }

		
		if(st4[i].Getpolitics()<60)    
		 {
		     j++;
		 }
       if(j>0) 
	   {
		 cout<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的英语成绩为:"<<st4[i].Getenglish()<<endl;
		 cout<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的数学成绩为:"<<st4[i].Getmaths()<<endl;
		 cout<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的物理成绩为:"<<st4[i].Getphysics()<<endl;
		 cout<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的vc成绩为:"<<st4[i].Getvc()<<endl;
		 cout<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的政治成绩为:"<<st4[i].Getpolitics()<<endl;
		 cout<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的体育成绩为:"<<st4[i].Getsports()<<endl;
		 cout<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的组成原理成绩为:"<<st4[i].Getftenet()<<endl;
         cout<<st4[i].Getname()<<"不及格课程共"<<j<<"门"<<endl;   
		 outfile4<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的英语成绩为:"<<st4[i].Getenglish()<<endl;
		 outfile4<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的数学成绩为:"<<st4[i].Getmaths()<<endl;
		 outfile4<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的物理成绩为:"<<st4[i].Getphysics()<<endl;
		 outfile4<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的vc成绩为:"<<st4[i].Getvc()<<endl;
		 outfile4<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的政治成绩为:"<<st4[i].Getpolitics()<<endl;
		 outfile4<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的体育成绩为:"<<st4[i].Getsports()<<endl;
		 outfile4<<"编号:"<<st4[i].Getnum()<<" "<<st4[i].Getname()<<"的组成原理成绩为:"<<st4[i].Getftenet()<<endl;
         outfile4<<st4[i].Getname()<<"不及格课程共"<<j<<"门"<<endl;  
	   }
	 }

       


} 


⌨️ 快捷键说明

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