l7.c 351 B

123456789101112131415161718192021
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main() {
  4. int pol;
  5. printf("Enter number: ");
  6. if (scanf("%d", &pol) != 1);
  7. char st[100] = "";
  8. int x = 0;
  9. if (pol >= 100) pol = 99;
  10. while(x < pol) {
  11. int len = strlen(st);
  12. st[len] = '*';
  13. st[len + 1] = '\0';
  14. x++;
  15. printf("%s\n", st);
  16. }
  17. }