Lab: Function Practice

  1. Write a function that rounds a double number to in integer
  2. Write a function that rounds a double number to one decimal place
  3. Write a function that rounds a double number to two decimal places
  4. Write a function that rounds a double number to three decimal places
  5. Test your program with this main
Write ONE function to replace the above four that takes a second number as a parameter that is the number of decimal places to round to. Solution