Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Jeremiah Hines
- // CMPS 190-1
- // Program 5
- // To display information about me
- #include <iostream>
- #include <iomanip>
- #include <string>
- using namespace std;
- int main()
- {
- //Variables
- string name, studentID;
- double courseNum, courseSection, QATPE, QATP, ETPE, ETP, EP, QAP, grade;
- //Input
- cout << "Please enter your name:" << endl;
- getline(cin, name);
- cout << "Please enter your student ID:" << endl;
- cin >> studentID;
- cout << "Please enter your course number and course section:" << endl;
- cin >> courseNum >> courseSection;
- cout << "Please enter your total points earned for quizzes and assignments:";
- cin >> QATPE;
- cout << "Please enter the total possible points for quizzes and assignments:";
- cin >> QATP;
- cout << "Please enter your total points earned for exams";
- cin >> ETPE;
- cout << "Please enter your total possible points for exams";
- cin >> ETP;
- // Processing
- QAP = (QATPE/QATP) * .6;
- EP = (ETPE/ETP) * .4;
- grade = QAP + EP;
- // Output
- cout << "Student:" << name << endl;
- cout << "Student ID:" << studentID << endl;
- cout << "Course number/Course section:" << courseNum;
- cout << "/" << courseSection << endl;
- cout << "Quizzes/Assignments Percentage: " << QAP * 100 << "%" << endl;
- cout << "Exams Percentage:" << EP*100 << "%" << endl;
- cout << "Semester Percentage:" << grade * 100 << "%" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement