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.

6 thoughts on “Write a C++ program that will display if a students is pass or not in his exam.”

  1. Pingback: Write a C++ program in which user enter his NTS and FSc marks and your program will help student in selection of university.

  2. Pingback: Basic Concepts of Programming Languages C++ Programming Examples

  3. Pingback: Top 40 projects with C++ for beginners in 2021

  4. 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.

  5. Wonderful website

    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!

  6. Pingback: C++ projects for beginners with source code - Codeboks

Leave a Comment

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