How to make diamond like this in C++ ? | SoloLearn: Learn to code for FREE!


How to make diamond like this in C++ ?

I never learn C++ before , this is my school assignment


11/15/2019 9:50:05 AM


11 Answers

New Answer


InsideHeartz If you have time then try to learn how "for loop" works. Once you do that then try to print a right angle triangle and hopefully you will make your way up to printing a normal triangle which is half of that diamond. Then just try to replicate it upside down.


InsideHeartz First try to make the upper half of it which is not very difficult. Then you have to write the same code but with slight modifications having one row less so that you don't repeat the centre row of the diamond.


I have one question to confirm. Are you into printing the diamond only, or along with the numbers I saw surrounding the diamond? Because the numbers around the diamond itself probably has a certain pattern (which I'm not getting TBH).


If you are talking about this diamond : * **** ******* **** * Take a look to this code


We're not expected to solve your school homework but someone will actually help if at all you made an attempt and it fails.


I had the same question as Ipang about the numbers: do you just need the diamond pattern or the numbers too?


Avinesh any example? i want to learn it sir ..


Mirielle🐶 [Inactive] I need reference to learn it i means , i just want to learn ..


Sonic both sir , like the diamond in center of number