Introduced a different intro comments and added a function
This commit is contained in:
parent
90140023cb
commit
d7bb962615
1 changed files with 12 additions and 4 deletions
16
main.c
16
main.c
|
|
@ -1,8 +1,11 @@
|
||||||
//
|
// Welcome to my journey of learning the fuckass language that is C
|
||||||
// Created by martin on 5/21/26.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int multiply(int num_one, int num_two) {
|
||||||
|
int result = num_one*num_two;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// HELLO WORLD SECTION
|
// HELLO WORLD SECTION
|
||||||
printf("HELLO WORLD BELOW:\n"); // DIVIDER
|
printf("HELLO WORLD BELOW:\n"); // DIVIDER
|
||||||
|
|
@ -63,6 +66,11 @@ int main() {
|
||||||
for (int i=0; i<=3; i++) {
|
for (int i=0; i<=3; i++) {
|
||||||
printf("i=%d\n", i);
|
printf("i=%d\n", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION
|
||||||
|
printf("\n\nFUNCTION (MULTIPLY) BELOW:\n"); // DIVIDER
|
||||||
|
printf("%d * %d = %d", 5, 30, multiply(5,30));
|
||||||
|
|
||||||
// END
|
// END
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue