Advertisement
Guest User

Untitled

a guest
Feb 20th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5. char mas[15], temp;
  6. int end_index, i
  7. scanf("%s15", mas);
  8. end_index=strlen(mas)-1;
  9. for(i=0; i<=end_index/2; --i)/// ?אם יש לי מילה בת 6 אותויות הקוד יעצר אחרי היפוך של השלוש הראשונות?
  10. {
  11. temp=a[i];
  12. a[i]=a[end_index-i];
  13. a[end_index-i]=temp;
  14. }
  15. printf("%s15", a);
  16. }
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement