Ok so here's my problem I am trying to make a parallelogram with a stars(*). This is what I have so farNow that gets the width and length correct but I can input the spaces to make it offset like this.Code:#include<stdio.h> int main (){ int numrow, numcols, i,; printf("Enter the length of your figure:\n"); scanf("%d", &numcols); printf("Enter the width of your figure\n"); scanf("%d", &numrow); while(numrow>0) for(i=0; i<numcols;i++){ for(i=0; i<numcols; i++) { printf("*"); } printf("\n"); numrow--; }
*****
_*****
__*****
___*****
I know i need a loop to print the spaces but i dont know where to put it or how to word it any help would be great!.
Thanks



LinkBack URL
About LinkBacks




