Hiya I am trying to make a line of diamunds appear across the screen to whatever the user enters under the value of eight.
It compiles fine but they keep arreaing down the screen and not across it. I was wondering is my function call the problem?
Code:#include <stdio.h> /*function prototype*/ void printDiamond ( void ); /*main function - begins program execution -----------------------------------*/ int main ( void ) { int counter; int amount; printf("How many diamonds: "); scanf("%d", &amount); while ( amount > 8 ) { puts("\nI cannot print more than eight diamonds!\n"); printf("Please re-enter amount: "); scanf("%d", &amount); } for ( counter = 1; counter <= amount; counter++ ) { printDiamond(); printf("\n\n"); } getch(); /*freeze console output window*/ return 0; /*return value from int main*/ } /*function to print a diamond shape*/ void printDiamond ( void ) { printf(" *\n***\n *"); }