Advertisement
Guest User

Untitled

a guest
Jul 13th, 2018
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.41 KB | None | 0 0
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_generic.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: jcaudal <marvin@42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2018/07/12 17:26:42 by jcaudal #+# #+# */
  9. /* Updated: 2018/07/13 14:21:42 by jcaudal ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12.  
  13. void ft_generic(void)
  14. {
  15. char *tab;
  16. int i;
  17.  
  18. tab = "Tut tut ; Tut tut\n";
  19. i = 0;
  20. while(i != 19)
  21. {
  22. write(1, &tab[i], 1);
  23. i++;
  24. }
  25. }
  26. /* ************************************************************************** */
  27. /* */
  28. /* ::: :::::::: */
  29. /* ft_takes_places.c :+: :+: :+: */
  30. /* +:+ +:+ +:+ */
  31. /* By: jcaudal <marvin@42.fr> +#+ +:+ +#+ */
  32. /* +#+#+#+#+#+ +#+ */
  33. /* Created: 2018/07/12 18:36:42 by jcaudal #+# #+# */
  34. /* Updated: 2018/07/12 23:54:45 by jcaudal ### ########.fr */
  35. /* */
  36. /* ************************************************************************** */
  37.  
  38. void ft_takes_places(int hour)
  39. {
  40. char *x;
  41. char *y;
  42.  
  43.  
  44.  
  45. printf("THE FOLLOWING TAKES PLACE BETWEEN %d.00 %s AND %d.00 %s\n", valiable1, variable2, variable3, variable4);
  46. }
  47. touch -A -000001 bomb.txt 2> /dev/null | stat %X bomb.txt 2> /dev/null | cut -d '"' -f 6
  48. /* ************************************************************************** */
  49. /* */
  50. /* ::: :::::::: */
  51. /* ft_antidote.c :+: :+: :+: */
  52. /* +:+ +:+ +:+ */
  53. /* By: jcaudal <marvin@42.fr> +#+ +:+ +#+ */
  54. /* +#+#+#+#+#+ +#+ */
  55. /* Created: 2018/07/13 01:59:04 by jcaudal #+# #+# */
  56. /* Updated: 2018/07/13 02:15:45 by jcaudal ### ########.fr */
  57. /* */
  58. /* ************************************************************************** */
  59.  
  60. int ft_antidote(int i, int j,int k)
  61. {
  62. if (k<i<j || j<i<k)
  63. return (i);
  64. if (i<j<k || k<j<i)
  65. return (j);
  66. if (i<k<j || j<k<i)
  67. return (k);
  68. }
  69. /* ************************************************************************** */
  70. /* */
  71. /* ::: :::::::: */
  72. /* ft_destroy.c :+: :+: :+: */
  73. /* +:+ +:+ +:+ */
  74. /* By: jcaudal <marvin@42.fr> +#+ +:+ +#+ */
  75. /* +#+#+#+#+#+ +#+ */
  76. /* Created: 2018/07/13 02:20:09 by jcaudal #+# #+# */
  77. /* Updated: 2018/07/13 03:31:36 by jcaudal ### ########.fr */
  78. /* */
  79. /* ************************************************************************** */
  80.  
  81. void ft_destroy(char ***factory)
  82. {
  83. free(str);
  84. }
  85. /* ************************************************************************** */
  86. /* */
  87. /* ::: :::::::: */
  88. /* ft_collatz_conjecture.c :+: :+: :+: */
  89. /* +:+ +:+ +:+ */
  90. /* By: jcaudal <marvin@42.fr> +#+ +:+ +#+ */
  91. /* +#+#+#+#+#+ +#+ */
  92. /* Created: 2018/07/13 03:41:24 by jcaudal #+# #+# */
  93. /* Updated: 2018/07/13 04:17:12 by jcaudal ### ########.fr */
  94. /* */
  95. /* ************************************************************************** */
  96.  
  97. unsigned int ft_collatz_conjecture(unsigned int base)
  98. {
  99. n = base % 2
  100.  
  101. if (n == 1)
  102. {
  103. return ((base *3)+1);
  104. ft_collatz_conjecture(base);
  105. }
  106. if (n == 0)
  107. {
  108. return (base / 2);
  109. ft_collatz_conjecture(base);
  110. }
  111. return (0);
  112. }
  113. #!/bin/sh
  114. var= ifconfig | grep inet' ' | grep -v 127.0.0.1 | cut -d' ' -f6-
  115.  
  116. if [ -n "$var" ]
  117. then
  118. echo "I am lost!"
  119. fi
  120. /* ************************************************************************** */
  121. /* */
  122. /* ::: :::::::: */
  123. /* ft_active_bits.c :+: :+: :+: */
  124. /* +:+ +:+ +:+ */
  125. /* By: jcaudal <marvin@42.fr> +#+ +:+ +#+ */
  126. /* +#+#+#+#+#+ +#+ */
  127. /* Created: 2018/07/13 11:10:33 by jcaudal #+# #+# */
  128. /* Updated: 2018/07/13 11:23:48 by jcaudal ### ########.fr */
  129. /* */
  130. /* ************************************************************************** */
  131.  
  132. unsigned int ft_active_bits(int value)
  133. {
  134. return (sizeof(value));
  135. }
  136. /* ************************************************************************** */
  137. /* */
  138. /* ::: :::::::: */
  139. /* ft_max.c :+: :+: :+: */
  140. /* +:+ +:+ +:+ */
  141. /* By: jcaudal <marvin@42.fr> +#+ +:+ +#+ */
  142. /* +#+#+#+#+#+ +#+ */
  143. /* Created: 2018/07/13 12:56:10 by jcaudal #+# #+# */
  144. /* Updated: 2018/07/13 13:20:52 by jcaudal ### ########.fr */
  145. /* */
  146. /* ************************************************************************** */
  147.  
  148. int ft_max(int *tab, int length)
  149. {
  150. int i;
  151. int max;
  152.  
  153. max = 0;
  154. i = length;
  155. while(i > -1)
  156. {
  157. if (tab[i] > max)
  158. {
  159. max = tab[i];
  160. }
  161. i--;
  162. }
  163. return (0);
  164. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement