Write code for this in C++ Program
Home
/
Write code for this in C++ Program
Write code for this in C++ Program
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
#include <iostream>
#include <string>
using namespace std;
int main()
{
int Password;
float Quiz, Activity, Exam, Grade;
string Name;
char selection;
cout << "Enter Password:";
cin >> Password;
cout << "Enter Name:";
cin >> Name;
cout << "\tYour Password is:" << Password << "\n\nHOME\nWelcome " << Name << " to Programming Language";
while(true){
cout << "Selection:\nEnter [A] to Compute for Grade\nEnter [B] to Grade Equivalent\nEnter [C] to Terminate\n\nEnter the Letter you choose:";
cin >> selection;
switch(selection){
case 'A':
cout << "Enter Quiz:";
cin >> Quiz;
cout << "Enter Activity:";
cin >> Activity;
cout << "Enter Exam:";
cin >> Exam;
Quiz = ((Quiz / 100) * 50 + 50) * .30;
Activity = ((Activity / 150) * 50 + 50) * .20;
Exam = ((Exam / 150) * 50 + 50) * .50;
Grade = Quiz + Activity + Exam;
cout << "Your Final Grade is " << Grade;
break;
case 'B':
break;
case 'C':
break;
}
}
return 0;
}