Divide one by the other and multiply by 100.

Just a recommendation, but using an Object Oriented approach you could get the results fairly easily. For example, if you created a class called Test...