-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Added a c++ library for working with fractions. #1558
Conversation
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.
Hey! This is really cool, but we currently don't have any support for it. Would you like to put the documentation together for this? See the projects page for examples.
This solution is a bit complicated, so I'll take a look shortly. |
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.
Overall, I love the idea. However, libraries don't really fit well with our collections (though I'm open to the thoughts of others). If there's a way to make this runnable, that would be great!
featured-image: | ||
tags: [c-plus-plus, fractions] | ||
authors: | ||
- niraj-kamdar |
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.
Make sure you add yourself to the author file. https://github.com/TheRenegadeCoder/sample-programs/blob/master/docs/_data/authors.yml
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.
I'm going to mention this again.
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.
If you add yourself to the authors file, we'll be good to go.
bottom will be assigned to denometor.Here we checks if denometor is zeros then we throws an error and if denomenator is | ||
negative then we negate top and bottom before assigning them. | ||
We also have to implement getters for this Class and a method for unary operator `-`. | ||
We also have to implement friend functions(one can use normal method) for binary operators like +, -, >=, == etc. |
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.
Here, we try to include a section for how to run the solution. It appears your solution is more of a library and less of an executable program.
I just noticed the main function! Any chance we could standardize it for user input? |
I have changed main function as required. |
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.
Much better! My only ask now is that you fix up the project description to match our typical template. In addition, I think you're missing a section in your article.
I don't know how to add article using syntax like this {% include article_list.md collection=site.categories.file-io %}. |
Let me know when you think it's ready for review. |
You can review it now. I guess i have completed all the requirements. |
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.
Looks amazing! I'm really happy with how this turned out. Just a couple points.
featured-image: | ||
tags: [c-plus-plus, fractions] | ||
authors: | ||
- niraj-kamdar |
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.
I'm going to mention this again.
Co-Authored-By: Jeremy Grifski <jeremy.grifski@gmail.com>
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.
Looks just about ready! We just need you to add yourself to the authors file.
i have updated authors.yml |
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.
Awesome! We're in good shape.
Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder! For simplicity, please make sure that your pull request includes one and only one contribution.
Complete the Applicable Sections Below
Find which section best describes your pull request and make sure you fill it out. To start, let us know which issue you've fixed.
Code Snippets
Added/Updated <Sample Program> in <Language>
formatDocumentation
Added/Updated <Sample Program> in <Language> Article
formatTesting
Added/Updated <Language>/<Project> Testing
formatNotes
Feel free to describe what you added or updated.