You are on page 1of 3

Southeast university

Assignment: C++ Programing


Submitted to:
Mahamudul Islam
lecturar
Department of Textile Engineering
SOUTHEAST UNIVERSITY
Submitted by:
Md. Asadujjaman
Batch-18th
ID- 2011200400005
DATE of SUBMISSION: 15-12-15

#include <iostream>
using namespace std;

int main()
{
int marks;
cout<<"enter your marks:\n";
cin>>marks ;
cout<<"your result is:\n";
switch(marks/5)
{
case 20:
case 19:
case 18:
case 17:
case 16:
cout<<"A+\n";
cout<<"GPA=4\n";
break ;
case 15:
cout<<"A\n";
cout<<"GPA=3.75\n";
break ;
case 14:
cout<<"A-\n";
cout<<"GPA=3.5\n";
break ;
case 13:
cout<<"B+\n";
cout<<"GPA=3.25\n";
break ;
case 12:
cout<<"B\n";
cout<<"GPA=3\n";
break ;
case 11:
cout<<"B-\n";
cout<<"GPA=2.75\n";
break ;
case 10:
cout<<"C+\n";
cout<<"GPA=2.5\n";
break ;
case 9:
cout<<"C\n";
cout<<"GPA=2.25\n";
break ;
case 8:
cout<<"D\n";
cout<<"GPA=2\n";
break ;
case 7:
case 6:
case 5:
case 4:
case 3:
case 2:

case 1:
case 0:
cout<<"F\n";
cout<<"GPA=0";
break ;
default :
break;
}
return 0;
}

You might also like