Advertisement
Guest User

odwrotnosc

a guest
Nov 26th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. char tekst[20];
  6. int i=0;
  7. int n=0;
  8. printf("Podaj tekst: ");
  9. scanf("%s", tekst);
  10. printf("\n");
  11. while(tekst[i] != 0)
  12. {
  13. i++;
  14. n++;
  15. }
  16. for(i=n;i=0;i--){
  17. printf ("Tekst odwrotny to: %c\n", tekst[i]);
  18. }
  19.  
  20. return 0;
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement