diff options
Diffstat (limited to 'week03/exercise09.cpp')
| -rw-r--r-- | week03/exercise09.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/week03/exercise09.cpp b/week03/exercise09.cpp new file mode 100644 index 0000000..a4a5008 --- /dev/null +++ b/week03/exercise09.cpp @@ -0,0 +1,13 @@ +#include <iostream> +#include <stdlib.h> +#include <ctime> + +int main() { + srand(time(NULL)); + for (int row = 0; row < 20; row++) { + for (int col = 0; col < 20; col++) { + std::cout << ((rand() % 2) ? '/' : '\\'); + } + std::cout << std::endl; + } +} |
