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.
Output a diamond in C by asterisk sign
#include main() { int n, i, j; printf("Enter a number: "); scanf("%d",&n); /* Create up arrow. */ for(i=1; i<=n; i++) { /* Left side. */ for(j=i; j<=n+1; j++) { printf(" "); } for(j=1; j<=1; j++) { printf("*"); } /* Middle. */ for(j=1; j