C language or programminng -


can me print out following characters:

* ******** ** ******* *** ****** **** ***** ***** **** ****** *** ******* ** ******** * 

that's code:

#include <stdio.h>  int main(void) {     int row;     int column;     // fig :     (row=1;row<=7;row++) {          (column=1;column<=row;column++)             printf("*");         printf("\n");     }     printf("\n"); } 

you not printing upper right part. change loops print * remaining number if subtract row 7

for (row = 1; row <= 7; row++) {     (column = 1; column <= row; column++)         putchar('*');      putchar(' ');     (column = row; column <= 7; column++)         putchar('*');      putchar('\n'); } 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -