+7

How to make diamond like this in C++ ?

I never learn C++ before , this is my school assignment https://www.sololearn.com/post/176011/?ref=app

c++

11/15/2019 9:50:05 AM

Abdul Muttaqin

11 Answers

New Answer

+5

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.

+6

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.

+5

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).

+5

If you are talking about this diamond : * **** ******* **** * Take a look to this code https://code.sololearn.com/czUfnczI13am/?ref=app

+4

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

+3

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

+2

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

+2

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

0

Sonic both sir , like the diamond in center of number