in the year 1907 plastic was invented
Answer:
d. This statement results in input failure.
Explanation:
We are taking input of 3 variables only and those are x,ch,and y. cin is a C++ keyword used take input entered by the user onto the screen cin is not a variable.
The input should of type int char int as written in the code. First is x and character variable ch and then the integer variable y and there should be only three inputs.
Answer:
12. for (i = 0 ; i < testGrades.length ; i+=1 ){
13. if (testGrades[i] > 100){
14. sumExtra = sumExtra + testGrades[i] - 100;}
15. }
Explanation:
We first iterate through the entire testGrades array. For each test score that is in testGrades ( that is testGrades[i] ), we see whether or not the test grade is above 100 (See line 12) . If test grade is greater than 100, this means we have extra credit. We simply subtract 100 from the test grade, add it with the previous value of sumExtra and store the value back in sumExtra(see line 14). Once i is greater than the length of the test grades, the loop is exited. We can now print sumExtra to obtain the result.