diff options
author | Oskar <[email protected]> | 2024-09-06 17:10:32 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-09-06 17:10:32 +0200 |
commit | cc01160a3f0fdcb27eb931f67e85d783d0f5626d (patch) | |
tree | 3574e221430241d8b9e11c73ae27cc1301b015f9 /6p23.cpp | |
parent | 9b73f5889937d88796b45126f6165027fecd3436 (diff) |
more
Diffstat (limited to '6p23.cpp')
-rw-r--r-- | 6p23.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/6p23.cpp b/6p23.cpp new file mode 100644 index 0000000..c8e2cdc --- /dev/null +++ b/6p23.cpp @@ -0,0 +1,39 @@ +#include <iostream> +#include <iterator> + +/* + * + * 6.23 + * + * + */ + +void printint(const int i) { + + std::cout << i << std::endl; +} + +void print1(const int *cbeg, const int *cend) { + + while(cbeg != cend) { + std::cout << *cbeg++ << std::endl; + } +} + +void print2(const int arr[], const size_t size) { + + for(size_t i = 0 ; i != size ; i++) { + std::cout << arr[i] << std::endl; + } +} + +int main () { + + int i = 0; + int j[2] = {0, 1}; + printint(i); + printint(10); + print1(std::cbegin(j), std::cend(j)); + print2(j, std::cend(j) - std::cbegin(j)); + return 0; +} |