Practice Questions
Question 1: `x` is a fixed-point number with scaling factor 1e18. `y` is a fixed-point number with scaling factor 1e6. We want to divide `x` by `y` and get a fixed-point number with scaling factor 1e18. Write the code that accomplishes this.
Question 2: `x` is a fixed-point number with scaling factor 1e15. `y` is a fixed-point number with scaling factor 1e12. We want to divide `x` by `y` and get a fixed-point number with scaling factor 1e18. Write the code that accomplishes this.
Question 3: `x` is a fixed-point number with scaling factor 1e20. `y` is a fixed-point number with scaling factor 1e10. We want to divide `x` by `y` and get a fixed-point number with scaling factor 1e15. Write the code that accomplishes this.
Question 4: `x` is a fixed-point number with scaling factor 1e18. `y` is a fixed-point number with scaling factor 1e18. We want to divide `x` by `y` and get a fixed-point number with scaling factor 1e18. Write the code that accomplishes this.
Question 5: `x` is a fixed-point number with scaling factor 1e8. `y` is a fixed-point number with scaling factor 1e10. We want to divide `x` by `y` and get a fixed-point number with scaling factor 1e6. Write the code that accomplishes this.