i want to write a function that can add only -ve numbers from a list of integers. i can declare a function that can add the negative numbers, my problem is how do i get the -ve numbers from a string of both +ve and -ve numbers
int SumOfNumbers(int a, int b){
int result;
result = a+b;
return (result);
}
this where the problem is, i want to declare a function that captures both negative and positive numbers but adds only the negative numbers in from the input
Bookmarks