/**
* @file 2nd_sem_evaluator.cpp
* @author Harsh Mittal
* @brief
* @version 0.1
* @date 2022-06-30
*
* @copyright Copyright (c) 2022
*
*/
/**
* @file 2nd_sem_evaluator.cpp
* @author Harsh Mittal
* @brief
* @version 0.1
* @date 2022-06-30
*
* @copyright Copyright (c) 2022
*
*/
#include <iostream>
using namespace std;
int evaluator(float n, int cred)
{
if (n >= 93 && n <= 100)
{
return cred * 10;
}
else if (n >= 85 && n < 93)
{
return cred * 9;
}
else if (n >= 77 && n < 85)
{
return cred * 8;
}
else if (n >= 69 && n < 77)
{
return cred * 7;
}
else if (n >= 61 && n < 69)
{
return cred * 6;
}
else if (n >= 53 && n < 61)
{
return cred * 5;
}
else if (n >= 45 && n < 53)
{
return cred * 4;
}
else
{
return 0;
}
}
int main()
{
float oops, dt_2, beee, gp_2, cad_lab, pcs, maths_2, physics, acadres;
string indep;
int indepcr;
cout << "Enter marks of each subject (add internal + external marks) out of 100" << endl;
cout << "Enter Marks of OOPs Using C++" << endl;
cin >> oops;
cout << "Enter Marks of Disruptive Technologies-2 " << endl;
cin >> dt_2;
cout << "Enter Marks of BEEE / Biology" << endl;
cin >> beee;
cout << "Enter Marks of General Profieciency-2 out of/100 (respective platform)" << endl;
cin >> gp_2;
cout << "Enter Marks of AutoCad / Workshop Technology" << endl;
cin >> cad_lab;
cout << "Enter Marks of PCS" << endl;
cin >> pcs;
cout << "Enter Marks of Maths-2" << endl;
cin >> maths_2;
cout << "Enter Marks of Physics / Digital Electronics" << endl;
cin >> physics;
cout << "Enter Marks of Academic research Paper and IPR \n (SHL marks obtained/160)*100 " << endl;
cin >> acadres;
cout << "Enter grade of Independent Project" << endl;
cin >> indep;
if (indep == "A+" || indep == "a+")
{
indepcr = 10;
}
else if (indep == "A" || indep == "a")
{
indepcr = 9;
}
else if (indep == "B+" || indep == "b+")
{
indepcr = 8;
}
else if (indep == "B" || indep == "b")
{
indepcr = 7;
}
else if (indep == "C+" || indep == "c+")
{
indepcr = 6;
}
else if (indep == "C" || indep == "c")
{
indepcr = 5;
}
else if (indep == "D+" || indep == "d+")
{
indepcr = 4;
}
else
{
cout << "Enter Valid Grade Of Independent Project" << endl;
}
float ans = (evaluator(oops, 4) + evaluator(dt_2, 2) + evaluator(beee, 3) + evaluator(gp_2, 1) + evaluator(cad_lab, 1) + evaluator(pcs, 3) + evaluator(maths_2, 4) + evaluator(physics, 4) + evaluator(acadres, 1) + indepcr);
float total_cred = 24.00;
// cout<<ans<<endl<<endl;
// cout<<evaluator(oops, 4)<<endl;
// cout<<evaluator(dt_2, 2)<<endl;
// cout<<evaluator(beee, 3)<<endl;
// cout<<evaluator(gp_2, 1)<<endl;
// cout<<evaluator(cad_lab, 1)<<endl;
// cout<<evaluator(pcs, 3)<<endl;
// cout<<evaluator(maths_2, 4)<<endl;
// cout<<evaluator(physics, 4)<<endl;
// cout<<evaluator(acadres, 1)<<endl;
// cout<<indepcr<<endl;
// cout<<"Made by Harsh Mittal"<<endl;
cout << "Your Expected CGPA is ---->" << ans / total_cred<<endl;
return 0;
}