Anduril, take a look at this.
/*This program should print diamond shapes composed of * characters*/
#include <stdio.h>
#include <math.h>
Type: Posts; User: Jackbenimble
Anduril, take a look at this.
/*This program should print diamond shapes composed of * characters*/
#include <stdio.h>
#include <math.h>
God save the queen, I figured out how to print a full, complete, correct diamond. Whew (brushes sweat off forehead).
Now, however, I need to add a few things to my code. After I print the...
Ok, thank you everyone for all the help and suggestions. I'm gonna step back and look at my for loops and the logic that occurs. However, I believe that I'm on the right track and that I should be...
It certainly makes sense, but it changes my method of operation. In the code where I skip even rows, I am able to print out all the way to the maximum star level. Ie, if the use enters 5, my code...
Ok, I'm still confused on how to embed it. Also, my row sizes start at 1 and increase by 2. So it goes row 1, row 3, row 5...etc.
Should it be
for (space = (half_width-row+1); space = 0;...
I managed to figure out how to print the top half of the diamond. However, I am still unsure on how to do the spacing. I can do the spacing backwards, but I can't manage to print it in the right...
star = (row*2-1)
but I don't know to implement this in a for loop. Like when row = 1, print (1*2-1) =1 stars. When row = 2 print 3 stars.
I also can't figure out a formula to relate spaces and...
I'm trying to write a code that prints out a diamond like shape when input is entered by the user. For example a user might enter the number 3 and this would print out
*
***
...