//WAP using classes input student info including marks of 4 subjects
   // calc and print students info including avg and grade

   #include 
   #include 
   #include 

   class student
	{
	private:
	char f_name[50];
	char l_name[50];
	char class_[40];
	char section_[40];
	float m1, m2, m3, m4, avg,tot;

	public:
	void getdata();
	void putdata();
	void Avg(float m1 , float m2 , float m3, float m4);
	};
	void student :: getdata()
		{
		cout << "\t Student information Form\n";
		cout << "\t**************************\n";
		cout << "\n* Enter First Name         : " ; gets(f_name);
		cout << "\n* Enter Last Name          : " ; gets(l_name);
		cout << "\n* Enter Class and Section  : " ; gets(class_);
		cout << "\n* Enter The Marks of the Student : " << f_name << endl;
		cout << "\n";
		cout << "\t* Enter Marks for Subject 1 :  " ; cin >> m1;
		cout << "\t* Enter Marks for Subject 2 :  " ; cin >> m2;
		cout << "\t* Enter Marks for Subject 3 :  " ; cin >> m3;
		cout << "\t* Enter Marks for Subject 4 :  " ; cin >> m4;

		}

	void student :: Avg(float x1 , float x2 , float x3, float x4)
		{
		tot = x1+x2+x3+x4;
		avg = tot/4;
		cout <<"\n* Total is 	     : "<<  tot << " out of 400\n";
		cout <<"\n* Avg is   	     : "<<  avg << "%\n\n";
		if(avg<40)
			cout << "* Grade              : F - Failed";
		else if(avg >=40 && avg<60)
			cout << "* Grade              : D - Poor";
		else if(avg >=60 && avg<75)
			cout << "* Grade              : C - Average";
		else if(avg>=75 && avg<90)
			cout << "* Grade              : B - Good Keep it up";
		else if(avg>=90 && avg<95)
			cout << "* Grade              : -A - Excellent";
		else if(avg>=95)
			cout << "* Grade              : +A - Total Genius";
		}
	void student :: putdata()
		{
		cout << "\n\n\t Marksheet of Student " << f_name << endl;
		cout << "\t******************************\n"<

    Source: geocities.com/cplusplussurvivalkit