using System;
class Program
{
public static double GetPercentage(float num1, float num2) {
return (num1 / num2) * 100.0;
}
static void Main() {
Console.WriteLine("30 is {0:F2}% of 40", GetPercentage(30, 40));
Console.WriteLine("40 is {0:F2}% of 30", GetPercentage(40, 30));
Console.WriteLine("20 is {0:F2}% of 35", GetPercentage(20, 35));
}
}
/*
run:
30 is 75.00% of 40
40 is 133.33% of 30
20 is 57.14% of 35
*/