#include<iostream.h>
#include<fstream.h>
#include<conio.h>
void main()
{
                int rn,tm,i;
                clrscr();
                ifstream myfile("marks.txt");
                for(i=0;i<10;i++)
                                {
                                myfile>>rn;
                                myfile>>tm;
                                if(tm>=300)
                                                cout<<rn<<"\t"<<tm<<endl;
                                }
                myfile.close();
                getch();
}

 

Advertisements