Question
Greetings, everyone i have trouble with this exercise in c language Write a user-defined function called AddNegative that receives two parameters: an array of integers,
Greetings, everyone i have trouble with this exercise in c language
Write a user-defined function
called AddNegative that receives two parameters: an array of integers, and an integer that contains the number of elements in the array. The function adds only the number of values that are negative numbers that appear in the array and returns the total. Example: if array contains 2, -7, - 2,1,5, -6, 6, -5,4, -2 the function would return the number -22 since the negative numbers are -7, -2, -6, -5 and -2 in the array. (Hint: a conditional statement in your loop)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started