Advertisement
Guest User

ex15 16 finis

a guest
Sep 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.27 KB | None | 0 0
  1. # Exercice 15
  2. mafonction = function(x,y)
  3. {
  4.   if (y<0)
  5.   {
  6.     y=0
  7.   }
  8.   z = x + log(y)
  9.   z
  10. }
  11. print(mafonction(3,-5))
  12. # Exercice 16
  13. a = c(1:3)
  14. b = c(2:4)
  15. print(a)
  16. print(a+5)
  17. print(b)
  18. print(b-a)
  19. print(a*b)
  20. print(a/b)
  21. print(b**2)
  22. print(b%%3)
  23. print(a**b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement