participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 140,3,1014467615.20681,Write the definition of a function isPositive, that receives an integer parameter and returns true if the parameter is positive, and false otherwise.,isPositive(int x) { if( x < 0) { return true; } },2,12550.101464454307,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 140,3,1014531995.465021,Given a string, s, and an integer, x, update s such that its characters are shifted by x. Ex. s = "cd", x = 1. Loop results in s = "de",shift(int x, string s) { for(auto c : s) { c = c + x; } return s; },4,4347.777189425455,60000 140,3,1014596686.273944,Implement a function secondGreatest that accepts a vector of integers and returns the second greatest element in the vector,int secondGreatest(vector &x) { for(int i = 0; i < x.size(); ++i) { if(x[i] > x[i + 1]) } },7,4397.706872125136,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 140,3,1014663292.924579,Given integer variables amount and total both initialized to 0, write a loop that reads in values for amount from standard in and adds them to total until total is greater than 100.,int amount = 0; int total = 0; while(total <= 100) { cin >> amount; total = total + amount; },5,6572.964785377049,60000 140,3,1014729387.479165,Write a statement that toggles the value of the bool variable onOffSwitch. That is, if onOffSwitch is false, itsvalue is changed to true; if onOffSwitch is true, its value is changed to false.,if(onoffswitch == false) { onoffswitch = true; } else { onoffswitch = false; },1,6039.430667597635,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 140,3,1014794221.188865,Implement a function is_sorted that accepts a vector of integer values and returns true if it is non-decreasing, and false otherwise,bool is_sorted(vactor x) { for(int i = 1; i < x.size(); ++i) { if(x[i] < x[i - 1]) { return true' } } return false; },3,4804.042402247438,60000 140,3,1014858742.379561,Implement a function countdown() that accepts an integer n as a parameter and counts down from n, printing each number to standard output, separated by a space. After reaching n, print "liftoff!",countdown(int n) { int i = 0; while(i != n) { cout << i << " "; } cout << n << " liftoff!"; },8,4494.1924259597645,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 140,3,1014925027.961676,Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002. Given an int variable modelYear and a string modelName, print "RECALL" if modelYear and modelName match the recal details,recall(int modelyear, string name) { if(modelyear >= 1999 && modelyear <= 2002 && name == "Extravagant") { cout << "RECALL" < } },0,6258.851995720413,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 140,3,1014990582.830279,Implement a function containsDuplicate that accepts a vector of integers and returns true if it contains a duplicate element, and false otherwise,containsduplicate(vector x) { for(int i = 0; i < x.size() - 1; +i) { for(int j = i + 1; j < x.size(); ++j) { if(x[i] == x[j]) { return true; } } } return false' },6,5534.932197092801,60000