Advertisement
Guest User

MAIN

a guest
May 3rd, 2022
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.59 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include "my_func.cpp"
  5.  
  6. extern char* ladny_tekst();
  7. extern int* dlugosci_slow();
  8. extern void wyrownanie_do_prawej();
  9.  
  10. int main(int argc, char* argv[])
  11. {
  12.  
  13.     int szerokosc;
  14.     printf("Podaj szerokosc linii: ");
  15.     scanf("%d", &szerokosc);
  16.    
  17.  
  18.     if (szerokosc > 0) // szerokosc musi byc wieksza od zera
  19.     {
  20.         char* text = ladny_tekst();
  21.         int* dlugosci_wyrazow = dlugosci_slow(szerokosc, text);
  22.         wyrownanie_do_prawej(text, dlugosci_wyrazow, szerokosc);
  23.     }
  24.     else
  25.         printf("Szerokosc nie moze byc rowna 0.\n\n");
  26.        
  27.     return 0;
  28. }
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement