1 2 3 4 5 6 7 8 9 10 11 12 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; } }