This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!

Lab 1 - 28.02.2012 | DM2

By: MartinPrvi on Feb 27th, 2012  |  syntax: None  |  size: 0.97 KB  |  views: 130  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. __________________________________________________________________________
  2. Prva zadaca---------------------------------------------------------------
  3. n = Input["Vnesi promenliva"]
  4. m = 1;
  5. While[m <= n, If[m*2 <= 10 && Mod[m, 2] == 0, Print[m]]; m++]
  6.  
  7. __________________________________________________________________________
  8. Votra zadaca--------------------------------------------------------------
  9. n = Input["Vnesi go n"]
  10. max1 = 0;
  11. a = {};
  12. For[i = 1, i <= n, i++, broj = Input["Vnesi broj"]; AppendTo[a, broj];
  13.   If[broj > max1, max1 = broj]]
  14. max1
  15. For[j = 1, j <= n, j++, If[Mod[max1, j] == 0, Print[j]]]
  16.  
  17. _________________________________________________________________________
  18. Treta zadaca-------------------------------------------------------------
  19. n = Input["Vnesi go n"]
  20. br = 1;
  21. While[n > 0, Print[n]; br = br*Mod[n, 10]; n = IntegerPart[n/10];]
  22. br
  23.  
  24.  
  25.  
  26.  
  27.  
  28. ********************************obtained*tnx*to*Vlade*&*Vlade*(bitolapower)*****************************
clone this paste RAW Paste Data