-
Notifications
You must be signed in to change notification settings - Fork 0
Add function to add two numbers #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Rollback Files For Sweep
|
Apply Sweep Rules to your PR?
|
Apply Sweep Rules to your PR?
|
|
Can you also add another function called "addComplexNumbers" that adds two Complex numbers and returns their sum ? |
🚀 Wrote ChangesDone. |
|
Can you add a unit test for addComplexNumbers ? Add it in a file called add_test.go and put that file in the same directory. |
🚀 Wrote ChangesDone. |
| a, b complex128 | ||
| expected complex128 | ||
| }{ | ||
| {"add zero", 0, 0, 0}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add another test scenario here, for large numbers (e.g. 9 digit imaginary component of the complex number).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Wrote Changes
Done.
Description
This PR adds a new file
add.goto the repository, which contains a function to add two numbers and return the sum. The function is implemented in Go and follows the naming conventionaddNumbers.Summary of Changes
add.goin the root directory of the repository.package mainat the top of the file.addNumbersthat takes two integer parameters and returns their sum.Please review and merge this PR. Thank you!
Fixes #7.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: