Guest User

Untitled

a guest
Apr 26th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4.  
  5. {
  6.     int x;      //zeilen
  7.     int z;      //zeichen in zeile
  8.     int i;
  9.     char y;     //zeichen
  10.     printf("Bitte geben Sie das gewünschte Zeichen ein:\n");
  11.     scanf("%c", &y);
  12.     printf("Bitte waehlen Sie die Anzahl der Zeilen:\n");
  13.     scanf("%d", &x);
  14.     return 0;
  15. }
  16.  
  17. int f1 (void)
  18. {
  19.     printf("Funktion 1\n\n");
  20.     for (i=1;i<=x;i++)
  21.         {
  22.             for (z=15;z>i;z--)
  23.             {
  24.                 printf("%c", ' ');
  25.             }  
  26.                 for (y=1;y<=i;y++)
  27.                 {
  28.                     printf("%c", y);           
  29.                 }
  30.         }
  31. }
Add Comment
Please, Sign In to add comment