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

📄 resultmanagementprogram.txt

📁 this is a program for illustrating resturant billing management
💻 TXT
📖 第 1 页 / 共 3 页
字号:
			gotoxy(15,13);
			cout<<"MATHS";
			gotoxy(3,15);
			cout<<"3";
			gotoxy(15,15);
			cout<<"PHYSICS";
			gotoxy(3,17);
			cout<<"4";
			gotoxy(15,17);
			cout<<"CHEMISTRY";
			gotoxy(3,19);
			cout<<"5";
			gotoxy(15,19);
			cout<<"COMPUTER";
			gotoxy(3,25);
			cout<<"6";
			gotoxy(15,25);
			cout<<"TOTAL";
			gotoxy(3,27);
			cout<<"7";
			gotoxy(15,27);
			cout<<"PERCENTAGE";


			gotoxy(8,1);
			cout<<stdres.clas; /*printing student information*/
			gotoxy(25,1);
			cout<<stdres.s;
			gotoxy(40,1);
			cout<<stdres.rollno;
			gotoxy(63,1);



	gotoxy(63,1);
	gets(stdres.name);
	fflush(stdin);

	gotoxy(14,5);
	gets(stdres.fatername);
	fflush(stdin);
	gotoxy(60,5);
	gets(stdres.teachname);

	gotoxy(47,11);                               /*marks table*/
	cout<<"100";
	gotoxy(32,11);
	cin>>stdres.engmark;
	gotoxy(72,11);
	cout<<grade(stdres.engmark,max1);

	gotoxy(47,13);
	cout<<"100";
	gotoxy(32,13);
	cin>>stdres.matmark;
	gotoxy(72,13);
	cout<<grade(stdres.matmark,max1);

	gotoxy(47,15);
	cout<<" 70";
	gotoxy(32,15);
	cin>>stdres.phymark;
	gotoxy(72,15);
	cout<<grade(stdres.phymark,max2);

	gotoxy(47,17);
	cout<<" 70";
	gotoxy(32,17);
	cin>>stdres.chemark;
	gotoxy(72,17);
	cout<<grade(stdres.chemark,max2);

	gotoxy(47,19);
	cout<<" 70";
	gotoxy(32,19);
	cin>>stdres.commark;
	gotoxy(72,19);
	cout<<grade(stdres.commark,max2);

	gotoxy(47,25);
	cout<<"410";
	gotoxy(31,25);

cout<<total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,st
dres.commark);

stdres.total=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.che
mark,stdres.commark);

	gotoxy(32,27);
	stdres.percentage=percent(stdres.total);
	cout<<stdres.percentage;
	gotoxy(80,50);


	tfile.write((char*)&stdres,sizeof(stdres));
	result.read((char*)&stdres,sizeof(stdres));

	getch();
	}
	       else
	       {
		tfile.write((char*)&stdres,sizeof(stdres));
		result.read((char*)&stdres,sizeof(stdres));
	       }


		}
		else
		{
		    tfile.write((char*)&stdres,sizeof(stdres));

		    result.read((char*)&stdres,sizeof(stdres));
		   }

     }
     result.close();
     tfile.close();

     if(flag2==1)
     {
	result.open("result.dat",ios::out|ios::binary);
	tfile.open("tfile.dat",ios::in|ios::binary);
	tfile.read((char*)&stdres,sizeof(stdres));
	while(tfile)
	{
		result.write((char*)&stdres,sizeof(stdres));
		tfile.read((char*)&stdres,sizeof(stdres));
	}
	result.close();
	tfile.close();



     }

     if(flag==0)
     {

	clrscr();
	gotoxy(23,23);
	cout<<"SORRY! The Roll No."<<roll<<" does not exist.";
	gotoxy(23,25);
	cout<<"         PLEASE! TRY AGAIN.";
	result.close();
	getch();

     }


  menu();
}



void merit1()


       {                // FUNCTION TO GENERATE MERIT LIST //
	clrscr();
	int larg,l,flag=0;
	gotoxy(15,17);
	cout<<"Press any key for the merit list 
";
	gotoxy(80,50);
	getch();
	clrscr();
	gotoxy(15,17);
	cout<<"PLEASE wait while the list is being generated...";
	gotoxy(80,50);
	delay(2000);
	clrscr();
	gotoxy(15,15);
	cout<<"LIST generated.";
	gotoxy(15,17);
	cout<<"press any key to continue...";
	gotoxy(80,50);
	getch();
	clrscr();
	fstream result,tfile;
	result.open("result.dat",ios::in|ios::binary);
	tfile.open("tfile.dat",ios::out|ios::binary);


	result.read((char*)&stdres,sizeof(stdres));
	while(result)
	{

l=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdres
commark);
		if(l>368)
		{
		temp.roll=stdres.rollno;
		strcpy(temp.name,stdres.name);
		temp.clas=stdres.clas;
		temp.sec=stdres.s;
		temp.total=l;
		tfile.write((char*)&temp,sizeof(temp));
		}
		result.read((char*)&stdres,sizeof(stdres));


	}


	result.close();
	tfile.close();
	gotoxy(12,1);
	cout<<"ROLL NO.";
	gotoxy(22,1);
	cout<<"NAME";
	gotoxy(38,1);
	cout<<"TOTAL";

	int k=3;
	for(int i=410;i>368;i--)
	{

		tfile.open("tfile.dat",ios::in|ios::binary);
		tfile.read((char*)&temp,sizeof(temp));
		while(tfile)
		{
			if(temp.total==i)
			{
				flag=1;
				gotoxy(15,k);
				cout<<temp.roll;
				gotoxy(22,k);
				cout<<temp.name;
				gotoxy(39,k++);
				cout<<temp.total;
				k++;

			}
			tfile.read((char*)&temp,sizeof(temp));

		}
		tfile.close();
	}


	if(flag==0)
	{
		clrscr();
		gotoxy(15,20);
		cout<<"SORRY! No record found.";
	}
	gotoxy(80,50);
	getch();
	menu();

}

 void merit()
{
		  // FUNCTION TO GENERATE SECOND MERIT LIST //
	reverse:
	clrscr();
	int n,c,k=3,flag=0,i;
	gotoxy(15,2);
	cout<<"MENU";
	gotoxy(15,4);
	cout<<"1. ENGLISH";
	gotoxy(15,5);
	cout<<"2. MATHEMATICS";
	gotoxy(15,6);
	cout<<"3. PHYSICS";
	gotoxy(15,7);
	cout<<"4. CHEMISTRY";
	gotoxy(15,8);
	cout<<"5. COMPUTER";
	gotoxy(15,18);
	cout<<"Enter your option: ";
	cin>>n;
	clrscr();

	fstream result;
	switch(n)
	{

		/*english*/

		case 1: back1:
			gotoxy(15,2);
			cout<<"1. Students with Grade 'A'";
			gotoxy(15,3);
			cout<<"2. Students with Grade 'B'";
			gotoxy(15,4);
			cout<<"3. Students with Grade 'C'";
			gotoxy(15,5);
			cout<<"4. Students with Grade 'E' ";
			gotoxy(15,7);
			cout<<"Enter your Option: ";
			cin>>c;
			clrscr();
			gotoxy(14,1);
			cout<<"Roll no.";
			gotoxy(25,1);
			cout<<"Name";
			gotoxy(37,1);
			cout<<"Class";
			gotoxy(45,1);
			cout<<"Section";
			gotoxy(60,1);
			cout<<"<Marks";
			switch(c)
			{
				case 1: for(i=100;i>74;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.engmark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.engmark;
							k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					gotoxy(80,50);

					}
					if(flag==0)
					{
						gotoxy(20,22);						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);

					}

					getch();

					break;

				case 2:    for(i=74;i>60;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.engmark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.engmark;
							k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					}
					gotoxy(80,50);
										if(flag==0)
					{

						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);

					}
					getch();
					break;

				case 3:   for(i=60;i>33;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.engmark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.engmark;
							k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					}
					gotoxy(80,50);
					if(flag==0)
					{
						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);
					}
					 getch();
					break;
				case 4:    for( i=33;i>0;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.engmark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.engmark;
							 k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					}
					gotoxy(80,50);
					if(flag==0)
					{
						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);
					}
					getch();
					break;
				default:clrscr();
					gotoxy(25,25);
					cout<<"Invalid Option.";
					getch();
					goto back1;
			}

			menu();


			/*mathematics*/
		case 2: back2:
			gotoxy(15,2);
			cout<<"1. Students with Grade 'A'";
			gotoxy(15,3);
			cout<<"2. Students with Grade 'B'";
			gotoxy(15,4);
			cout<<"3. Students with Grade 'C'";
			gotoxy(15,5);
			cout<<"4. Students with Grade 'E' ";
			gotoxy(15,7);
			cout<<"Enter your Option: ";
			cin>>c;
			clrscr();
			gotoxy(14,1);
			cout<<"Roll no.";
			gotoxy(25,1);
			cout<<"Name";
			gotoxy(37,1);
			cout<<"Class";
			gotoxy(45,1);
			cout<<"Section";
			gotoxy(60,1);
			cout<<"Marks";
			switch(c)
			{
				case 1: for(i=100;i>74;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.matmark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.matmark;
							k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					gotoxy(80,50);

					}
					if(flag==0)
					{
						gotoxy(20,22);						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);

					}

					getch();

					break;

				case 2:    for(i=74;i>60;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.matmark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.matmark;
							k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					}
					gotoxy(80,50);
						if(flag==0)
					{

						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);

					}
					getch();
					break;

				case 3:   for(i=60;i>33;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.matmark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.matmark;
							k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					}
					gotoxy(80,50);
					if(flag==0)
					{
						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);
					}
					 getch();
					break;
				case 4:    for( i=33;i>0;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.matmark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.matmark;
							 k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					}
					gotoxy(80,50);
					if(flag==0)
					{
						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);
					}
					getch();
					break;
				default:clrscr();
					gotoxy(25,25);
					cout<<"Invalid Option.";
					getch();
					goto back2;
			}

			menu();

		       /*physics*/

		case 3: back3:
			gotoxy(15,2);
			cout<<"1. Students with Grade 'A'";
			gotoxy(15,3);
			cout<<"2. Students with Grade 'B'";
			gotoxy(15,4);
			cout<<"3. Students with Grade 'C'";
			gotoxy(15,5);
			cout<<"4. Students with Grade 'E' ";
			gotoxy(15,7);
			cout<<"Enter your Option: ";
			cin>>c;
			clrscr();
			gotoxy(14,1);
			cout<<"Roll no.";
			gotoxy(25,1);
			cout<<"Name";
			gotoxy(37,1);
			cout<<"Class";
			gotoxy(45,1);
			cout<<"Section";
			gotoxy(60,1);
			cout<<"Marks";
			switch(c)
			{
				case 1: for(i=100;i>74;i--)
					{

					result.open("result.dat",ios::in|ios::binary);
					result.read((char*)&stdres,sizeof(stdres));
					while(result)
					{
					if(stdres.phymark==i)
						{
							flag=1;
							gotoxy (17,k);
							cout<<stdres.rollno;
							gotoxy(25,k);
							cout<<stdres.name;
							gotoxy(39,k);
							cout<<stdres.clas;
							gotoxy(47,k);
							cout<<stdres.s;
							gotoxy(62,k++);
							cout<<stdres.phymark;
							k++;

						}
					result.read((char*)&stdres,sizeof(stdres));

					}
					result.close();
					gotoxy(80,50);

					}
					if(flag==0)
					{
						gotoxy(20,22);						gotoxy(20,22);
						cout<<"NO RECORD FOUND.";
						gotoxy(80,50);

					}

⌨️ 快捷键说明

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