+ 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
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.
+ 2
Wang Teng Zheng You are right. Bennett Post has a better idea
+ 2
The hint Bennett Post gave you is good, whether you get your input from the user or not.
+ 1
Would you be able to write a similar but more simple program?
Such as one that outputs this for instance?
*
***
*****
+ 1
Wang Teng Zheng What about the whole rhombus shape, without the numbers?
+ 1
so generating the sequence of numbers is where you are stuck then?
+ 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
+ 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
+ 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.
+ 1
S-Stefanova oh thank you ill write it
+ 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
+ 1
Wang Teng Zheng It seems to be doing exactly what you want it to do. :)
+ 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
0
devisfun i had my own answer,but i cant post here,too long for space...
0
S-Stefanova ya i can
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
0
S-Stefanova ya i know
0
S-Stefanova i dont understand why need to convert int between string and reverse strings