CPTTRN1 - Character Patterns (Act 1)

Using two characters: . (dot) and * (asterisk) print a chessboard-like pattern. The first character printed should be * (asterisk).


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).


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.


3 1
4 4
2 5




hide comments
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?

=(Francky)=> Top right, find 'My status'.

Last edit: 2016-11-20 11:51:08
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(".")
I cant understand it...when my program should show a dot instead of asterik..

liuxueyang: 2016-07-16 13:42:17

practice common lisp language. 1AC. ;-)
Anyone use common lisp?

jikhashakya: 2016-05-30 09:19:06

ideone.com compiles and runs my program successfully but the judge gives "wrong answer"...anyone out there to help?

thobhanifreddy: 2016-04-29 16:39:58

Does I,e means each digit in 2 digit integer or they are different inputs? If no how can I take different input in same line!

Last edit: 2016-04-29 17:18:28
p_konieczniak: 2016-03-21 23:03:04

Please don't tell, that second output is bad. It might look like this, but output have a clear regular property.

swastik_31: 2016-03-18 16:10:28

i don't know how to get different columns.

Added by:kuszi
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64