#include<iostream.h>
#include<fstream.h>
#include<conio.h>
void main()
{
                int rn,s1,s2,s3,i;
                clrscr();
                ifstream myfile;
                myfile.open("marks.txt");
                for(i=0;i<10;i++)
                                {
                                myfile>>rn;
                                myfile>>s1>>s2>>s3;
                                if(s1>=35 && s2>=35 && s3>=35)
                                                cout<<rn<<endl;
                                }
                myfile.close();
                getch();
}

 

Advertisements