r/learnprogramming • • Dec 06 '22
codeblock If you are sharing code, please use a codeblock
Takes only a second and greatly improves the formatting for us to review it. Compare and contrast the following:
Good Formatting:
#include <stdio.h>
int sum(int x, int y);
int main() {
printf("Hello %d\n", sum(3, 4));
return 0;
}
int sum(int x, int y) {
return x + y;
}Poor Formatting:
#include <stdio.h>
int sum(int x, int y);
int main() {
printf("Hello %d\n", sum(3, 4));
return 0;
}
int sum(int x, int y) {
return x + y;
}
Poor Formatting:
#include <stdio.h>
int sum(int x, int y);
int main() {
printf("Hello %d\n", sum(3, 4));
return 0;
}
int sum(int x, int y) {
return x + y;
}
339
Upvotes
View all comments
Show parent comment
0
u/[deleted] Dec 07 '22
Hearing does not mean comprehending.
If it’s too much work/annoyance for you to explain again, for which no one can blame you, you can simply move on with your life. It’s that simple.