TGTGInsighttelegram intelligenceLIVE / telegram public index
← Computer Programming
Computer Programming avatar

TGINSIGHT POST

Post #155

@cpp_sirius

Computer Programming

Visninger170Antall visninger
Publisert6. okt.06.10.2025, 17:26
Innhold

Innholdet i innlegget

// Problem 6 // Total GPA? // input: number of classes - fanlar soni - 5 ta ASC, FP, CP, DT, Cal // input: credits for subject CP - 8 // input: total mark; mark - 4 // totalGPA = (credit*mark+creditofCP*mark)/totalCredit // totalGPA = (3*4.5 + 2*3.5 + 1*4.5)/(3+2+1) = (13.5+7+4.5)/6 = 25 / 6 = 4.1666 // totalGPA = totalMark/totalCredit // float n, credit, mark, totalMark = 0, totalCredit = 0; // cout<<"Enter the number of subjects: "; cin>>n; // for (int i=1; i<=n; i++) { // cout<<"Enter credits and mark: "; cin>>credit>>mark; // totalCredit += credit; // totalMark += credit*mark; // } // float totalGPA = totalMark/totalCredit; // cout<<"Total GPA: "<<totalGPA<<endl;