+ 1

Pattern in c using alternate stars

*?*? ?*?* *?*? ?*?* write the code to print this pattern

23rd Mar 2018, 6:06 PM
Megha Agarwal
5 Answers
+ 4
@Megha, you already have understood the logic for the task, I would encourage you to try to implement that logic into code (language of your choice), then if you're having difficulties yo can link the code with a question so everyone can see : ) P.S. I see you didn't tag any language, it's necessary so people can understand which language is preferred for solution.
24th Mar 2018, 3:40 PM
Ipang
+ 3
What is your Question???
23rd Mar 2018, 6:23 PM
dieserrapha
dieserrapha - avatar
23rd Mar 2018, 6:51 PM
dieserrapha
dieserrapha - avatar
+ 1
can anyone help me to print this pattern
23rd Mar 2018, 6:35 PM
Megha Agarwal
+ 1
in linux the answer will be:- echo "enter no of rows" read n for((i=1; i<=n; i++)) do for((j=1; j<=n; j++)) do k=`expr $i + $j` if test `expr $k % 2` -eq 0 then echo -e "*\c" else echo -e "?\c' fi done echo " " done
24th Mar 2018, 8:50 AM
Megha Agarwal