Hey I need help with ignoring negative numbers when I am trying to add up only positive numbers.
SAMPLE:
if (num>=0) {
sum= sum + num;
}
else
how would the else in this case being a negative number not be included in the sum
THANKS!
CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
Results 1 to 5 of 5
Thread: Ignore negative numberThreaded View
|
Click Here to Expand Forum to Full Width |