participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 130,2,1020815040.681087,Write a for loop that prints the integers 1 through 40, separated by spaces or new lines. You may use only one variable, count which has already been declared as an integer.,for (; cout) { cout << count << " "; } ,5,12585.230041543768,30000 130,2,1020852697.598489,Write a function addOne that adds 1 to its integer reference parameter. The function returns nothing.,void addOne (int& x) { /* YOUR CODE HERE */ x = x + 1; return; } ,1,7622.167002458822,30000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 130,2,1020887853.592084,Given that an array of int named a has been declared with 12 elements and that the integer variable k holds a value between 0 and 6. Assign 9 to the element just after a[k].,a[k+1] = 9;,10,5113.732486117138,30000 130,2,1020921688.157623,Complete the switch statement to output "Moo!" when the value of animal is "cow",switch(animal) { case "pig": cout << "Oink!" << endl; break; case "hen": cout << "Cluck!" << endl; break; /* YOUR CODE HERE */ case"cpw": cout << "Moo!" << endl; break; } ,15,3811.1807188422877,30000 130,2,1020955786.429631,Given two 3x5 2D arrays of integer, x1 and x2, write the code needed to copy every value from x1 to its corresponding element in x2.,for(int i = 0; i < 3; i++){ for(int j = 0; j < 5; j++){ /* YOUR CODE HERE */ x1[i][j] == x2[u] } } ,13,4073.9180285413,30000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 130,2,1020990729.304498,Complete the definition of the function absoluteValue such that it receives an integer parameter and returns the absolute value of the parameter's value.,int absoluteValue(int num1) { /* YOUR CODE HERE */ if num1 < 0 { } absoluteValue = abs(num1); return absoluteValue; } ,2,4917.832718521146,30000 130,2,1021028366.533153,Complete the assignment of the variable isFailing such that it is set to true if exam_score is less than 50, and false otherwise,int exam_score; cin >> exam_score; bool isFailing = /* YOUR CODE HERE */ exam_score < 50; if (isFailing) { cout << "You failed!" << endl; } else { cout << "You passed!" << endl; } ,8,7597.674459346431,30000 130,2,1021064398.168142,Given an int variable k that has already been declared, use a for loop to print a single line consisting of 97 asterisks. Use no variables other than k.,for (/* YOUR CODE HERE */; k < 97; ++k){ cout << "*"; } ,7,6002.132694685629,30000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 130,2,1021098024.325537,Using one expression, complete the function notDivisibleByThree that returns false if x is divisible by three, and true otherwise,bool notDivisibleByThree(int x){ return /*YOUR CODE HERE*/x%3 != }; } ,9,3601.8549760449087,30000 130,2,1021131394.761985,Complete the definition of a function isSenior, that receives an integer parameter and returns true if the parameter's value is greater or equal to 65, and false otherwise.,bool isSenior(int age) { /* YOUR CODE HERE */ return age >= 65; } ,4,3343.01373618221,30000 130,2,1021167021.991051,Using two statements, complete the definition of the function swapints that is passed two int variables. The function returns nothing but exchanges the values of the two variables.,void swapints(int &a, int &b){ int temp = a; /* YOUR CODE HERE */ a = b; b - te } ,0,5597.310087747147,30000 130,2,1021201265.634258,Complete the for loop such that it prints the odd integers 11 through 121 inclusive, separated by spaces.,for (int i = 11; i <= 121; /* YOUR CODE HERE */i+=2) { cout << i << " "; } ,3,4211.46564363303,30000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 130,2,1021236534.751798,Write the definition of a function min that has two int parameters and returns the smaller.,int min (int num1, int num2) { /* YOUR CODE HERE */ if (num1 < num2) { return num1; }}else + ,6,5244.4710698657955,30000 130,2,1021272820.041235,Complete the definition of a function max that has three int parameters and returns the largest.,int max(int x,int y,int z) { if (x > z && x > y) { return x; } else if (/*YOUR CODE HERE*/y>x %$#@!) { return y; } else { return z; } } ,12,6267.54755037773,30000 130,2,1021309417.016862,Complete the if/else statement such that it assigns true to the variable fever if the variable temperature is greater than 98.6; otherwise it assigns false to fever.,if (temperature > 98.6) { /* YOUR CODE HERE */ fever = true; } else { fever = false; } ,11,6571.401396646069,30000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 130,2,1021342925.302553,You are given a 6x8 (6 rows, 8 columns) array of integers, x, already initialized and three integer variables: max, i and j. Write the necessary code so that max will have the largest value in the array x.,max = x[0][0]; for(i = 0; i < 6; i++){ for(j = 0; j < 8; j++){ if(/* YOUR CODE HERE */max < x[i][j]){ max = x[i][j]; } } } ,14,3489.841355180757,30000 130,2,1021377899.929757,Write the definition of a function firstEqualsLast that checks if the first character of one string is the same as the last character of a second string,bool firstEqualsLast(string a, string b) { /* YOUR CODE HERE */ if a[0' == b[b.lemgth()=1] } ,16,4949.226034265851,30000