Problem
1. Suppose x and y are variables of type double. Write a code fragment that sets y to x if x is positive and to 0 otherwise.
2. Suppose x and y are variables of type double. Write a code fragment that sets y to the absolute value of x without calling the Math.abs function. Use an if statement.