>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 = "<

Presentation is loading. Please wait.

Presentation is loading. Please wait.

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;

Similar presentations


Presentation on theme: "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;"— Presentation transcript:

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; while ( i <= 2) { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_1.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _i_ QP string LG; 1 while ( i <= 2) { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_2.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _i_ QPcredit totCredit string LG; 1 0.0 while ( i <= 2) { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_3.jpg", "name": "What is output line of the following C++ code.", "description": "Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit string LG; 1 0.0 while ( i <= 2) { cout<< Class # <>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 = <

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; _i_ QPcredit totCredit num string LG; 1 0.0 0.0 while ( i <= 2) { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_4.jpg", "name": "What is output line of the following C++ code.", "description": "Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; _i_ QPcredit totCredit num string LG; 1 0.0 0.0 while ( i <= 2) { cout<< Class # <>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 = <

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; _i_ QPcredit totCredit num LG string LG; 1 0.0 0.0 while ( i <= 2) { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_5.jpg", "name": "What is output line of the following C++ code.", "description": "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 0.0 0.0 while ( i <= 2) { cout<< Class # <>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 = <

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; _i_ QPcredit totCredit num LG string LG; 1 0.0 0.0 while ( i <= 2) //true { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_6.jpg", "name": "What is output line of the following C++ code.", "description": "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 0.0 0.0 while ( i <= 2) //true { cout<< Class # <>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 = <

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; _i_ QPcredit totCredit num LG string LG; 1 0.0 0.0 while ( i <= 2) //true { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_7.jpg", "name": "What is output line of the following C++ code.", "description": "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 0.0 0.0 while ( i <= 2) //true { cout<< Class # <>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 = <

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; _i_ QPcredit totCredit num LG string LG; 1 4 0.0 0.0 “B” while ( i <= 2) //true { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_8.jpg", "name": "What is output line of the following C++ code.", "description": "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 4 0.0 0.0 B while ( i <= 2) //true { cout<< Class # <>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 = <

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; _i_ QPcredit totCredit num LG string LG; 1 4 0.0 0.0 “B” while ( i <= 2) //true { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_9.jpg", "name": "What is output line of the following C++ code.", "description": "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 4 0.0 0.0 B while ( i <= 2) //true { cout<< Class # <>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 = <

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; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) //true { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_10.jpg", "name": "What is output line of the following C++ code.", "description": "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 { cout<< Class # <>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 = <

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; _i_ QPcredit totCredit num LG string LG; 1 3 4 0.0 0.0 “B” while ( i <= 2) //true 4.0 { cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_11.jpg", "name": "What is output line of the following C++ code.", "description": "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 { cout<< Class # <>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 = <

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; _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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_12.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_13.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_14.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_15.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_16.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_17.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_18.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_19.jpg", "name": "What is output line of the following C++ code.", "description": "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 # <>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 = <

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; _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 24.0 cout<<"Class # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_20.jpg", "name": "What is output line of the following C++ code.", "description": "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 24.0 cout<< Class # <>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 = <

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; _i_ QPcredit 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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_21.jpg", "name": "What is output line of the following C++ code.", "description": "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 3 4.0 12.0 A { 3 7.0 24.0 cout<< Class # <>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 = <

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; _i_ QPcredit 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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_22.jpg", "name": "What is output line of the following C++ code.", "description": "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) // false 2 4 3 4.0 12.0 A { 3 7.0 24.0 cout<< Class # <>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 = <

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; GPA _i_ QPcredit 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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_23.jpg", "name": "What is output line of the following C++ code.", "description": "Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; GPA _i_ QPcredit 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 # <>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 = <

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; GPA _i_ QPcredit 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 # "<>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 = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/2609230/slides/slide_24.jpg", "name": "What is output line of the following C++ code.", "description": "Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; GPA _i_ QPcredit 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 # <>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 = <


Download ppt "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;"

Similar presentations


Ads by Google