Created
November 3, 2018 18:16
-
-
Save feynon/8a9491ed7886ee6f00f4e585bfedebad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int t; | |
cin>>t; | |
while(t--) | |
{ | |
int l, c, s; | |
cin >> l >> c >> s; | |
int breadth = (c * (s + 1)) + 1; | |
int height = (l * (s + 1)) + 1; | |
for(int i = 0; i < height; i++) | |
{ | |
for(int j = 0; j < breadth; j++) | |
{ | |
if(i % (s+1) == 0 || j % (s+1) == 0) | |
{ | |
cout << "*"; | |
} | |
else if((i/(s+1) + j/(s+1)) % 2 == 0) | |
{ | |
if(i % (s+1) == j % (s+1)) | |
{ | |
cout << "\\"; | |
} | |
else | |
{ | |
cout << "."; | |
} | |
} | |
else | |
{ | |
if(i % (s+1) == (s+1) - (j % (s+1))) | |
{ | |
cout <<"/"; | |
} | |
else | |
{ | |
cout << "."; | |
} | |
} | |
} | |
cout << "\n"; | |
} | |
cout << "\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment