Yahoo India Web Search

Search results

  1. Oct 9, 2014 · Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat. Learn more Explore Teams

  2. Aug 4, 2020 · Think of a Cartesian coordinate system whose origin is the center of symmetry of the diamond pattern to be drawn. The 0s reside in the lines y = x + (n - 1), y = -x + (n - 1), y = x - (n - 1), y = -x - (n - 1), and the axes y = 0, x = 0. Then we can easily codify this information to draw the diamond pattern:

  3. Since the middle and largest row of stars has 9 stars, you should make n equal to 9. You were able to print out half of the diamond, but now you have to try to make a function that prints a specific number of spaces, then a specific number of stars.

  4. May 5, 2012 · I want to be able to print a diamond like this when the user enters 5 for the diamond. But also will work for any value that is odd and greater than 0. I have a code that works to make a diamond for

  5. best you can do is to reverse the code. for example if you are able to make half diamond then use "\n" that many times and reverse the loops and make the other half or diamond. – yadav22ji Commented Feb 21, 2017 at 17:58

  6. Oct 23, 2016 · you can save a lot of time by figuring out that (row<=n?row:(row-2*k)) doesn't depend on the inner loop variable

  7. Nov 20, 2022 · Here's the code of a solid diamond and I want to remove the middle and leave the edges. From this, to this, public void DiamondOne() { int i, j, count = 1, number; ...

  8. Dec 9, 2017 · What I've been trying to do is figure out what to put inside the parenthesis where it says (//ATTENTION). I've been working for at least an hour trying to do random things, and one time it worked when I input 4, but not for 5, and it's just been very hard. This is key to building the diamond, try putting in just value and compile to see what ...

  9. Mar 22, 2020 · I am trying to draw this diamond so that after the middle row, the rest of the diamond is shifted 3 spaces to the right, as though you were looking at it through a glass of water. Could you somehow modify the code below to incorporate this shift? The output should look something like: * *** ***** ***** ***** *** *

  10. Sep 16, 2014 · Envision each row as two numbers: x) number of space, and y) number of stars.So for you example you get: i x y ----- 0: 2 1 1: 1 3 2: 0 5 2: 0 5 1: 1 3 0: 2 1

  1. People also search for