what is output line of the following c++ code? please trace int i = 1, qp; data: 4, b, 3, a double...
TRANSCRIPT
![Page 1: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/1.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG; while ( i <= 2) { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
![Page 2: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/2.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP string LG; 1 while ( i <= 2) { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
![Page 3: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/3.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit string LG; 1 0.0 while ( i <= 2) { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
![Page 4: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/4.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num string LG; 1 0.0 0.0 while ( i <= 2) { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
![Page 5: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/5.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 0.0 0.0 while ( i <= 2) { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
![Page 6: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/6.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 0.0 0.0 while ( i <= 2) //true { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
![Page 7: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/7.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 0.0 0.0 while ( i <= 2) //true { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade?
![Page 8: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/8.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 4 0.0 0.0 “B” while ( i <= 2) //true { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 B
![Page 9: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/9.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 4 0.0 0.0 “B” while ( i <= 2) //true { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") //false { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 B
![Page 10: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/10.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) //true { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") //false { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 B
![Page 11: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/11.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) //true 4.0 { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") //false { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 B
![Page 12: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/12.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) //true 4.0 12.0 { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") //false { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 B
![Page 13: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/13.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // 2 4.0 12.0 { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 B
![Page 14: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/14.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // true 2 4.0 12.0 { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 B
![Page 15: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/15.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // true 2 4.0 12.0 { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade?
![Page 16: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/16.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // true 2 3 4.0 12.0 ”A” { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 A
![Page 17: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/17.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // true 2 3 4.0 12.0 ”A” { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // true { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 A
![Page 18: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/18.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // true 2 4 3 4.0 12.0 ”A” { cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // true { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 A
![Page 19: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/19.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // true 2 4 3 4.0 12.0 ”A” { 7.0 cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // true { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 A
![Page 20: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/20.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // true 2 4 3 4.0 12.0 ”A” { 7.0 24.0 cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // true { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 A
![Page 21: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/21.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // 2 4 3 4.0 12.0 ”A” { 3 7.0 24.0 cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 A
![Page 22: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/22.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QP credit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) // false 2 4 3 4.0 12.0 ”A” { 3 7.0 24.0 cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 A
![Page 23: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/23.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; GPA _i_ QP credit totCredit num LG string LG; 3.43 1 3 4 0.0 0.0 “B” while ( i <= 2) // false 2 4 3 4.0 12.0 ”A” { 3 7.0 24.0 cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 A
![Page 24: What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;](https://reader038.vdocument.in/reader038/viewer/2022110116/551bf2f1550346b9588b66be/html5/thumbnails/24.jpg)
What is output line of the following C++ code? Please trace
int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; GPA _i_ QP credit totCredit num LG string LG; 3.43 1 3 4 0.0 0.0 “B” while ( i <= 2) // false 2 4 3 4.0 12.0 ”A” { 3 7.0 24.0 cout<<"Class # "<<i<<"credit Letter Grade? "; cin >>credit>>LG; if (LG == "A") // { QP = 4; } else { QP = 3; } totCredit = totCredit + credit; num = num + credit * QP; i = i + 1; } double GPA = num / totCredit; cout<<"GPA = "<<GPA<<endl;
Class # 1 credit Letter Grade? 4 BClass # 2 credit Letter Grade? 3 AGPA= 3.42857