[🏆CHALLENGE🏆] Create a triangle out of slashes! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

[🏆CHALLENGE🏆] Create a triangle out of slashes!

Challenge: Create a code that will take user input, and generate a centered and layered triangle out of slashes ("/", "\"), that has a base. Any language is welcome! Example: Input: 3 Output: /\ / \ / \ ******

6th Oct 2017, 5:27 PM
LunarCoffee
LunarCoffee - avatar
12 Answers
+ 7
Thanks to all for participating! This was my first challenge type thing. 😀
7th Oct 2017, 2:57 AM
LunarCoffee
LunarCoffee - avatar
+ 12
//it is not able print accurately , still a try ☺ https://code.sololearn.com/c4qI3S0ziM1Z/?ref=app
6th Oct 2017, 6:53 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
24th Nov 2017, 1:09 PM
Infinity
Infinity - avatar
7th Oct 2017, 12:29 AM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
7th Oct 2017, 3:49 AM
David Ashton
David Ashton - avatar
+ 4
Here you go. Checks for valid input https://code.sololearn.com/cyB1ot06r81N/?ref=app
7th Oct 2017, 4:27 AM
Vari93
Vari93 - avatar
+ 4
I'm still quite new to Java (learning it rn, it's pretty nice), so I'm kind of surprised I pulled this off: https://code.sololearn.com/cIZ41QTPlR8u/?ref=app
16th Oct 2017, 3:23 AM
LunarCoffee
LunarCoffee - avatar
+ 3
https://code.sololearn.com/cn6VA69iNqJF/?ref=app
6th Oct 2017, 5:50 PM
Hiroki Masuda
Hiroki Masuda - avatar
6th Oct 2017, 7:54 PM
Amr Ibrahim Khudair
Amr Ibrahim Khudair - avatar
6th Oct 2017, 10:56 PM
ysraelcon
ysraelcon - avatar
7th Oct 2017, 7:35 AM
Sketch
Sketch - avatar
29th Jul 2021, 5:06 PM
Shivendra Upadhyay
Shivendra Upadhyay - avatar