Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. // Jeremiah Hines
  2. // CMPS 190-1
  3. // Program 5
  4. // To display information about me
  5.  
  6. #include <iostream>
  7. #include <iomanip>
  8. #include <string>
  9.  
  10. using namespace std;
  11.  
  12. int main()
  13. {
  14. //Variables
  15. string name, studentID;
  16. double courseNum, courseSection, QATPE, QATP, ETPE, ETP, EP, QAP, grade;
  17.  
  18. //Input
  19. cout << "Please enter your name:" << endl;
  20. getline(cin, name);
  21.  
  22. cout << "Please enter your student ID:" << endl;
  23. cin >> studentID;
  24.  
  25. cout << "Please enter your course number and course section:" << endl;
  26. cin >> courseNum >> courseSection;
  27.  
  28. cout << "Please enter your total points earned for quizzes and assignments:";
  29. cin >> QATPE;
  30.  
  31. cout << "Please enter the total possible points for quizzes and assignments:";
  32. cin >> QATP;
  33.  
  34. cout << "Please enter your total points earned for exams";
  35. cin >> ETPE;
  36.  
  37. cout << "Please enter your total possible points for exams";
  38. cin >> ETP;
  39.  
  40. // Processing
  41. QAP = (QATPE/QATP) * .6;
  42. EP = (ETPE/ETP) * .4;
  43. grade = QAP + EP;
  44.  
  45. // Output
  46. cout << "Student:" << name << endl;
  47. cout << "Student ID:" << studentID << endl;
  48. cout << "Course number/Course section:" << courseNum;
  49. cout << "/" << courseSection << endl;
  50. cout << "Quizzes/Assignments Percentage: " << QAP * 100 << "%" << endl;
  51. cout << "Exams Percentage:" << EP*100 << "%" << endl;
  52. cout << "Semester Percentage:" << grade * 100 << "%" << endl;
  53.  
  54. return 0;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement