Advertisement
dzieciol

Labolatorium IV zadanie 2

Nov 12th, 2015
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     char napis[20];
  7.     int dl,i;
  8.     printf("Podaj napis ktory ma byc wyswietlony od tylu:");
  9.     fgets(napis,20,stdin);
  10.     dl=strlen(napis)-1;
  11.  
  12.  
  13.     printf("wyswietl napis:\n");
  14.     for(i=dl-1;i>=0;i--){
  15.             if(napis[i]==' ') printf("\n"); else
  16.         printf("%c",napis[i]);
  17.     }
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement