Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #1)
  2. function nagyobb
  3. {
  4. $n = read-host „Add meg az első számot:”
  5. $m = read-host „Add meg az második számot:”
  6.  
  7. If($n -gt $m){return $n}
  8. If($m -gt $n){return $m}
  9. If($n -eq $n){return $n}
  10. }
  11.  
  12. function arlista
  13. {
  14.  
  15.  
  16. }
  17.  
  18.  
  19.  
  20. #3)
  21. function sarkany
  22. {
  23. $a = Get-Random -minimum 1 -maximum 11
  24. Add-Content C:\Users\gl9uin\Desktop\karok.txt "`nA sari lebontott $a tornyot"
  25. }
  26.  
  27.  
  28. #4)
  29. function OkozottKarok
  30. {
  31. Get-Content C:\Users\gl9uin\Desktop\karok.txt | Where-Object{$_ -match "\d+(,\d+)?"} |
  32. ForEach-Object{[double]($matches[0] -replace ",",".")} |
  33. Measure-Object -Sum |
  34. Select-Object -ExpandProperty sum
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement