add Chapter01 examples

This commit is contained in:
Amar Mahmutbegovic
2024-04-27 20:43:40 +02:00
parent fb4983465f
commit de6d74e093
12 changed files with 435 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#include <cstdio>
#include <limits>
int foo(int x) {
int y = x + 1;
return y > x;
}
int main() {
if (foo(std::numeric_limits<int>::max())) {
printf("X is larger than X + 1\r\n");
} else {
printf("X is NOT larger than X + 1. Oh nooo !\r\n");
}
return 0;
}