-
Description If it does not work, just say :).
Code template<typename T> T add(T a, T b){ return a-(-b); }
Test Cases // TODO: Replace examples and use TDD development by writing your own tests Describe(somathing) { It(basic) { Assert::That(add(1024, 1024), Equals(2048)); Assert::That(add(add(1.0, 1.5), add(32.0, 64.5)), Equals(99)); } It(negativ_plus_positiv){ Assert::That(add(1024, -1024), Equals(0)); Assert::That(add(-512, 256)); } };
Output:
-
- All
- {{group.name}} ({{group.count}})
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}