Company: Cognitive_20nov
Difficulty: medium
Problem Description Implement the following function: int SumOfNegative(int a, int b, int c, int d); The function accepts four integers 'a', 'b', 'c', and 'd' as its argument. Find the sum of negative numbers out of these four numbers and return the same. Note: Return 0 if no negative number is present. Assumption: Sum will lie within integer range. Examples Example 1 Input 2 -3 -14 7 Output: -17 Explanation: The input values are a=2, b=-3, c=-14, d=7 (corresponding to the lines of input). The negative numbers are -3 and -14. Their sum is -3 + (-14) = -17. Example 2 Input -1 -10 2 -25 Output: -36 Explanation: The input values are a=-1, b=-10, c=2, d=-25. The negative numbers are -1, -10, and -25. Their sum is -1 + (-10) + (-25) = -36. Submission Notes This is a template based question, DO NOT write the "main" function. Your code is judged by an automated system, do not write any additional welcome/greeting messages. "Save and Test" only checks for basic test cases, more rigorous cases