Can someone create and explain this program to me please? (HARD for me) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone create and explain this program to me please? (HARD for me)

if i input number of rows: 5 its like rhombus structure Output below: 1 212 32123 4321234 543212345 4321234 32123 212 1

30th May 2019, 11:00 AM
Tzion
Tzion - avatar
18 Answers
+ 2
If it's hard for you it'll be hard for most other people on here; it's not really fair to expect someone to do all the work for you for free, and you won't learn anything that way either. Have a go at figuring it out yourself then come back and ask for help if you run into errors.
30th May 2019, 11:16 AM
Rincewind
Rincewind - avatar
+ 2
Wang Teng Zheng You are right. Bennett Post has a better idea
30th May 2019, 11:53 AM
S-Stefanova
S-Stefanova - avatar
+ 2
The hint Bennett Post gave you is good, whether you get your input from the user or not.
30th May 2019, 12:05 PM
S-Stefanova
S-Stefanova - avatar
+ 1
Would you be able to write a similar but more simple program? Such as one that outputs this for instance? * *** *****
30th May 2019, 11:21 AM
S-Stefanova
S-Stefanova - avatar
+ 1
Wang Teng Zheng What about the whole rhombus shape, without the numbers?
30th May 2019, 11:26 AM
S-Stefanova
S-Stefanova - avatar
+ 1
so generating the sequence of numbers is where you are stuck then?
30th May 2019, 11:35 AM
S-Stefanova
S-Stefanova - avatar
+ 1
if you know how to convert between int and string, as well as how to slice and reverse strings, you should be able to solve this
30th May 2019, 11:37 AM
S-Stefanova
S-Stefanova - avatar
+ 1
Bennett Post No u all are misunderstanding ,this question need to get input from user, i wrote it above.For example,a user input : 5 , then the computer will automatically create a rhombus with 5 rows
30th May 2019, 11:54 AM
Tzion
Tzion - avatar
+ 1
Wang Teng Zheng Why don't you write the program to the best of your ability here in Sololearn's playground? Then it would be easier for other users to give you meaningful input on it.
30th May 2019, 12:08 PM
S-Stefanova
S-Stefanova - avatar
+ 1
S-Stefanova oh thank you ill write it
30th May 2019, 12:21 PM
Tzion
Tzion - avatar
+ 1
@S-Stefanova @Bennett Post i've post a code in my profile,i dont know how to share it to discuss blog.... so u can check it,if can,explain to me please.....i dont really understanding
30th May 2019, 12:40 PM
Tzion
Tzion - avatar
+ 1
Wang Teng Zheng It seems to be doing exactly what you want it to do. :)
30th May 2019, 12:46 PM
S-Stefanova
S-Stefanova - avatar
+ 1
Had this one in my library for a while. Basically used 4 loops to make the 4 sides of the diamond C# isnt that different (syntactically) from Java so I hope you can understand it😅 https://code.sololearn.com/c98WsheoirwM/?ref=app
30th May 2019, 1:36 PM
Trigger
Trigger - avatar
0
devisfun i had my own answer,but i cant post here,too long for space...
30th May 2019, 11:21 AM
Tzion
Tzion - avatar
0
S-Stefanova ya i can
30th May 2019, 11:22 AM
Tzion
Tzion - avatar
0
S-Stefanova i also can do like 1 or 1 12 22 123 333 1234 4444 but this one is not constant accelerate so i cant figure it out
30th May 2019, 11:25 AM
Tzion
Tzion - avatar
0
S-Stefanova ya i know
30th May 2019, 11:27 AM
Tzion
Tzion - avatar
0
S-Stefanova i dont understand why need to convert int between string and reverse strings
30th May 2019, 11:52 AM
Tzion
Tzion - avatar