Percentage

Report a typo

Even a very big number can look very small if we compare it to another one that is huge. Let's try to look at them relatively!

Write a program that reads two large natural numbers and calculates the percentage of each number in their sum. You should ignore the fractional part of the percentage in the calculation.

Tip: Don't forget that the result of the division here is NOT a floating-point number.

Sample Input 1:

2
3

Sample Output 1:

40% 60%

Sample Input 2:

985703706758760345756
38573952062739408530852

Sample Output 2:

2% 97%
Write a program in Kotlin
fun main() {
// write your code here
}

Create a free account to access the full topic