-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update add_2_integers.c #1
base: master
Are you sure you want to change the base?
Conversation
int main() { | ||
int a, b, sum; | ||
|
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.
Keep in mind, that this codebase is intended for readers looking to learn C, so some obvious redundant efforts are actually intentionally, this include the print line here to let the user observe the start of the program execution.
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.
Okay purely understand that, many people have problems on many things. Thank you for your feedback, I appreciate that 🙏
// Get the first integer from the user | ||
printf("Enter the first integer: "); | ||
scanf("%d", &a); |
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.
Personally, i would argue that beginners be introduce to naming variables as meaningful constructs, since this doesn't offer any technical improvement over the previous structure, it is not an update , so we can stick with the longer variable names, nice work though 👌
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.
Okay I understand that and thank you for your feedback.
|
||
// Display the result | ||
printf("The sum of %d and %d is %d\n", a,b, sum); |
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.
🔥🔥🔥🔥
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 have indicated in the codebase the changes needed
Updated in simple form.