Harshad number C implementation#480
Conversation
|
Thanks for the submission! Could you please amend it to follow the unit testing conventions mentioned in the README ? |
|
I added some tests and descriptions ! |
|
Thanks for amending your submission! Before I go ahead and merge it, please amend your test to check the veracity of your algorithm's output; currently it seems to be only printing the output of your algorithm - leaving it up to the user to confirm the correctness by visual inspection. I would ask that it check the output (with assert statements) against an array of expected outputs. |
|
An example of C tests like this can be found here: https://github.com/kennyledet/Algorithm-Implementations/blob/master/Stat_Mode/C/PatrickYevsukov/stat_mode_test.c |
|
Thank you, I updated a little bit my test file to assert when the output is wrong. Hope all is good now :p |
|
Perfect! Thanks for the updates 😄 |
Harshad number C implementation
Implementation of Harshad number with the main function for testing.