Write a C++ program that will display if a students is pass or not in his exam.

C++ program that will display if a students is pass or not in his exam.

Write a C++ program that will display if a students is pass or not in his exam.

Object:

Write a C++ program that will display if a students is pass or not in his exam. (50% or more is pass). If the student is Pass than your program should display which letter the student has obtained:

  •  85% or more E for excellent
  • 75% or more but less than 85% O for Outstanding
  • 65% or more but less than 75% G for good
  •  Less than 65% S for satisfactory

If however the student is Fail (below 50% marks) your program should display. Whether the student should Resit or Redo depending on the following criteria. – 33% or more Resit in exam – Less than 33% Redo course.

Code:

#include<iostream>
#include<conio.h>

using namespace std;
void main()
{
int per;
cout<<“Enter a Student Percentage: “;
cin>>per;
if(per>=85 && per <=100)
{
cout<<“\nExcellent Work.”;
}
else if(per>=75 && per<85)
{
cout<<“\nOutstanding Work.”;
}
else if(per>=65 && per<75)
{
cout<<“\nGood Work.”;
}
else if(per>=50 && per<65)
{
cout<<“\nSatisfactory.”;
}
else if(per<50)
{
cout<<“\nBad Performance.”<<endl;
if(per<50 && per>=33)
{
cout<<“\nYou can Resit in Exam.”;
}
else
{
cout<<“\nPlease Redo your course!!”;
}
}
else
{
cout<<“\nInvalid Entry Please Enter Valid Percentage!!!”;
}
getch();
}

#include<iostream>
#include<conio.h>

using namespace std;
void main()
{
	int per;
	cout<<"Enter a Student Percentage: ";
	cin>>per;
	if(per>=85 && per <=100)
	{
		cout<<"\nExcellent Work.";
	}
	else if(per>=75 && per<85)
	{
		cout<<"\nOutstanding Work.";
	}
	else if(per>=65 && per<75)
	{
		cout<<"\nGood Work.";
	}
	else if(per>=50 && per<65)
	{
		cout<<"\nSatisfactory.";
	}
	else if(per<50)
	{
		cout<<"\nBad Performance."<<endl;
		if(per<50 && per>=33)
		{
			cout<<"\nYou can Resit in Exam.";
		}
		else
		{
			cout<<"\nPlease Redo your course!!";
		}
	}
	else
	{
		cout<<"\nInvalid Entry Please Enter Valid Percentage!!!";
	}
	getch();
}

Output:

Write a C++ program that will display if a students is pass or not in his exam. Write a C++ program that will display if a students is pass or not in his exam. Write a C++ program that will display if a students is pass or not in his exam.

Another Program: Write a c++ program that stores monthly rainfall amounts in an array.

Hi, I am M.A Siddiqui. I'm a Computer Science Student, In this website, I'm teaching you Multiple languages and provides Projects and other Subjects Notes.

You may also like...

5 Responses

  1. Rene says:

    Ahaa, its fastidious dialogue concerning this post here at
    this webpage, I have read all that, so at this time me
    also commenting at this place.

  2. Wonderful website says:

    Wonderful website. Lots of helpful information here. I am sending it to several friends and also sharing it deliciously. And certainly, thanks for your effort!

  1. May 6, 2020

    […] Another Program: Write a C++ program that will display if a students is pass or not in his exam. […]

  2. December 24, 2020

    […] Write a C++ program that will display if a students is pass or not in his exam. […]

  3. January 31, 2021

    […] Write a C++ program that will display if a students is pass or not in his exam. […]

Leave a Reply

Your email address will not be published. Required fields are marked *