User Tools

Site Tools


gibson:teaching:fall-2013:math445:hw3

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gibson:teaching:fall-2013:math445:hw3 [2013/10/14 18:52]
gibson
gibson:teaching:fall-2013:math445:hw3 [2013/10/22 07:14] (current)
gibson
Line 71: Line 71:
 ---- ----
  
-**A few more problems, added late 1/14/2013**. You don't have to turn these in, but they are fair game for the exam. I will add more example problems over the next few days.+**A few more problems, added late 10/14/2013**. You don't have to turn these in, but they are fair game for the exam. I will add more example problems over the next few days.
  
 25. Write an expression that returns the positive elements of a vector v. 25. Write an expression that returns the positive elements of a vector v.
Line 78: Line 78:
  
 27. Write an expression that returns the number of positive elements in a vector v. 27. Write an expression that returns the number of positive elements in a vector v.
 +
 +** Even more practice problems! Hooray! added 10/22/3013 **
 +
 +28. Write a function that computes the factorial of an integer n using a ''​while''​ loop.
 +
 +29. Write an ''​isPrime(n)''​ function that returns 1 (true) is n is prime and 0 (false) if n is not prime. Don't worry about making the test efficient or doing it with integer arithmetic.
 +
 +30. Write a function that returns a vector of all the integer divisors of an integer n. Again, don't worry about efficiency or integer arithmetic. ​
 +
 +
  
  
gibson/teaching/fall-2013/math445/hw3.1381801950.txt.gz ยท Last modified: 2013/10/14 18:52 by gibson