participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 119,3,11796129.034674,Write the definition of a function isPositive, that receives an integer parameter and returns true if the parameter is positive, and false otherwise.,bool isPositive(int num) { return num > 0; },2,13180.927602292099,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 119,3,11865203.716167,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.,onOffSwitch = !onOffSwitch; ,1,9028.25801311479,60000 119,3,11928518.933992,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!",void countdown(int n) { for (; n != 0; --n) { cout << n << ' '; } },8,3288.9033750872295,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 119,3,11991951.963975,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",for (size_t i = 0; i < s.size(); ++i() s[i]++;,4,3398.022075083772,60000 119,3,12058760.665178,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(vector nums) bool sorted = true; for (size_t i = 0; i , nums.size(); ++i) if (nums[i] < numsp-),3,6775.463865278885,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 119,3,12125358.451967,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.,cin >> amount; while (total < 100) total += amount;,5,6568.039498490239,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 119,3,12188966.244505,Implement a function secondGreatest that accepts a vector of integers and returns the second greatest element in the vector,int secondGreatest(vector nums) sort(nums.begin(), nums.end()); return nums[nums.size() ],7,3573.4481993019567,60000 119,3,12252558.655983,Implement a function containsDuplicate that accepts a vector of integers and returns true if it contains a duplicate element, and false otherwise,bool containsDuplicate(vector nums) sort(nums.begin(), nums.end()) for (int i = 0; i < nums.size() - 1; ++i) if (nums[i]),6,3571.467421130691,60000 participant-id,category,timestamp,prompt,answer,stimulus-id,previous-delay,stimulus_time 119,3,12318202.936613,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,if (modelYear < 2003 && modelYear > 1998) if (modelName == "Extravagant") cout << "RECALL",0,5615.469950220337,60000