+ 28
[ASSIGNMENT] Hollow Diamond
Write a program to take input from user of number of lines in the upper half to print the output in the given example: Example: Input: 5 Output: 1. * 2. * * 3. * * 4. * * 5. * * * * * * * * * If you didn't get the example then you can see my code given in answers section. All languages are welcome.
43 Answers
+ 30
wait ... i have 1 made already
https://code.sololearn.com/cHmnYWjL4Cl7/?ref=app
+ 19
+ 14
@Insan
Really?
Set your own try, do not steal others code.Guys, what wrong with you today?😁
+ 13
Recursion here I come
https://code.sololearn.com/cAie6PXUd1Oi/?ref=app
And this is how you do it in Cpp
https://code.sololearn.com/cx1D1As9I1CY/?ref=app
+ 13
Here's mine!!
https://code.sololearn.com/cgX7yj2nH2Mt/?ref=app
+ 13
@MN. Mohamed Rizkhan
Set your own try, do not steal others code.
Original :
https://code.sololearn.com/cpfQaTJZkUSy/?ref=app
Your (stolen) code:
https://code.sololearn.com/cbmjpCO2PvvR/?ref=app
+ 13
@HeisAbdulaziz
Hahaha...luckily, there are few of them 😊
+ 8
+ 7
Here is your answer:
https://code.sololearn.com/csmR5D0RPdFa/?ref=app
+ 7
Here is my try
Sweet and Simple😁
https://code.sololearn.com/c1w6tgM7sx4X/?ref=app
+ 6
https://code.sololearn.com/cpv67cm3wLTV/?ref=app
+ 6
I'm first for java lang =)
https://code.sololearn.com/cj1v9Eh0leJi/?ref=app
+ 6
No laughing 😐 (still a beginner)
https://code.sololearn.com/cDGnULuKz16z/?ref=app
+ 5
Here's mine
https://code.sololearn.com/WeF6to4XbxNs/?ref=app
+ 5
Diamond is just a two function: y = |x-N| and 2N-y = |x-N|. So, let's just drawn this functions. :)
https://code.sololearn.com/cPyV5NJc7PR7/
+ 5
Here's my try
https://code.sololearn.com/cY5COxXYsNJc/?ref=app
+ 5
My Try In Java
https://code.sololearn.com/c4zs8ct7DEuu/?ref=app
+ 5
And now the recursive version.
https://code.sololearn.com/cx1LKE8Mxfgr/?ref=app
+ 5
Junayed Ahmed
you copied my code
https://code.sololearn.com/cx1D1As9I1CY/?ref=app
https://code.sololearn.com/cna9nFCeyyNz/?ref=app
+ 4
fully functional(kinda)
and smaller than original(author's version)
https://code.sololearn.com/cdMw1mDLq4N5/?ref=app