+ 3

Do this challenge

ask the user to enter a value if i write 5 this appers on screen * ## $$ **** ##### the patern is after row of*, #,$ the pattern repeats. As the user enters 7 * ## $$ **** ##### $$$ ******* This program should be true for all numbers. Try hard sololearners and good luck.

9th Jan 2018, 8:02 AM
saksham kumar sharma
saksham kumar sharma - avatar
10 Answers
9th Jan 2018, 8:17 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
12th Jan 2018, 12:06 PM
Justine Ogaraku
Justine Ogaraku - avatar
+ 6
https://code.sololearn.com/cl01x1wxSP3P/?ref=app
9th Jan 2018, 6:27 PM
Himani
+ 5
@Saksham kumar sharma Any problem in the code? Did it fail for any input? Please let me know...
9th Jan 2018, 8:24 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 4
/* Here is one Java solution */ public class Program { public static void main(String[] args) { int n = new java.util.Scanner(System.in).nextInt(); char[] ch = new char [] {'*', '#', '
#x27;}; for (int i = 0, j = 0; i < n; i++, j++) { if (j == ch.length) j = 0; for (int k = 0; k <= i; k++) { System.out.print(ch[j]); } System.out.println(); } } }
9th Jan 2018, 8:58 AM
Boris Batinkov
Boris Batinkov - avatar
+ 3
well done kinshuk
9th Jan 2018, 8:44 AM
saksham kumar sharma
saksham kumar sharma - avatar
9th Jan 2018, 11:53 PM
Luis Lopes
Luis Lopes - avatar
+ 2
no
9th Jan 2018, 8:38 AM
saksham kumar sharma
saksham kumar sharma - avatar
+ 1
wow
9th Jan 2018, 10:33 AM
Anjali Kushwaha
Anjali  Kushwaha - avatar