CPTTRN1 - Character Patterns (Act 1)
Using two characters: . (dot) and * (asterisk) print a chessboard-like pattern. The first character printed should be * (asterisk).
Input
You are given t < 100 - the number of test cases and for each of the test cases two positive integers: l - the number of lines and c - the number of columns in the pattern (l, c < 100).
Output
For each of the test cases output the requested pattern (please have a look at the example). Use one line break in between successive patterns.
Example
Input: 3 3 1 4 4 2 5 Output: * . * *.*. .*.* *.*. .*.* *.*.* .*.*.
hide comments
deepk_keshri:
2017-08-21 19:48:42
if line no. is odd,odd position have * and if line is even ,even position will '*' |
|
mesakh123:
2017-08-09 08:38:43
there is two conditions and two sub conditions
|
|
dungtungmtp:
2017-04-06 20:37:30
ex1 and ex2 i can't know |
|
ag7775:
2017-03-13 12:26:27
In all the three output example the pattern is different. how i can figure out a constant pattern. |
|
kspoj:
2017-03-02 17:41:28
guys, how to store the output for all test cases and print it in the end?
|
|
tarun2619:
2017-01-17 19:03:32
Is there supposed to be a blank line at the end?? |
|
orkhan_az:
2016-12-27 13:54:08
All this is achieved with a single cycle for() and conditions if else |
|
dgodfrey:
2016-11-20 00:17:29
Where can I find my submissions?
|
|
kingrocker:
2016-11-15 14:29:36
OK thats it I have tried to solve this in C and I am getting no where Will someone Help me out i want the Solution just in C
|
|
za4:
2016-07-23 10:39:40
Can some1 help me to sort out the mystery of dots(".")
|
Added by: | kuszi |
Date: | 2012-09-03 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |