Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Shultz_Lab2.CPP
//Logan Shultz //Shultz_Lab2.CPP #include <iostream> #include <string> using namespace std; int main() { //Declare Variables string name, course_id, age, course_code, student_id; int exam_1, exam_2, exam_3, lab_1, lab_2, days_absent, days_present, course_100, course_200, course_days, att_grade, bonus_points, pts_equation; float cis_lab, acc_lab, be_lab, lab_avg, exam_avg, lab_pts, exam_pts, overall_grade; //Input cout<< "\n Enter your name"; cin>> name; cout<< "\n Enter your Course Major Code (1-COMP SCI, 2-ACCOUNTING, 3-BUSINESS ED)"; cin>> course_code; cout<< "\n Enter your age"; cin>> age; cout<< "\n Enter exam 1 score"; cin>> exam_1; cout<< "\n Enter your exam 2 score"; cin>> exam_2; cout<< "\n Enter your exam 3 score"; cin>> exam_3; cout<< "\n Enter your lab 1 score"; cin>> lab_1; cout<< "\n Enter your lab 2 score"; cin>> lab_2; cout<< "\n Enter the number of days you were absent"; cin>> days_absent; cout<< "\n Enter the course id (100, 200)"; cin>> course_id; //Known Input course_100 = 50; course_200 = 42; cis_lab = .30; acc_lab = .20; be_lab = .15; pts_equation = 1; //Calc student_id = name, + " " + age, + " " + course_id; //Course Days if (course_id == "100") course_days = 50; else if ((course_id == "200")) course_days = 42; //Days present days_present = course_days - days_absent; //Attendence Grade att_grade = (course_days - days_present) * 100; //Lab Avg lab_avg = (lab_1 + lab_2) / 2; //Lab Pts if (course_code == "comp_sci") lab_pts = lab_avg * cis_lab; else if ((course_code == "account")) lab_pts = lab_avg * acc_lab; else if ((course_code == "busines_ed")) lab_pts = lab_avg * be_lab; //Exam Avg exam_avg = (exam_1 + exam_2 + exam_3) / 3; //Exam Pts if (course_code == "comp_sci") exam_pts = (cis_lab - pts_equation) * exam_avg; else if ((course_code == "account")) exam_pts = (acc_lab - pts_equation) * exam_avg; else if ((course_code == "busines_ed")) exam_pts = (be_lab - pts_equation) * exam_avg; //Overall Grade overall_grade = (float)bonus_points + (exam_pts + lab_pts); //Output cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); // cout<< "\n Your student id is " << student_id; cout<< "\n Your overall_grade is " << overall_grade; cout<< "\n Your exam average is " << exam_avg; cout<< "\n Your lab average is " << lab_avg; cout<< "\n Your attendance grade is " << att_grade; return 0; }
run
|
edit
|
history
|
help
0
QUnabridged
count pairs with given sum hashing
Korelacja Pearsona lol
DP Optimization another kind
Exempel 2
C++ Solar eclipse program(Shoushi integrated) 1568 - 1644 also check Lunar eclipse for Xing Yunlu
My Tuple class
2015(M2)Simulare
nearest
maya angelou