Scala
Based on the revised question:
object G extends App
{
def g(i:IntBigInt,j:IntBigInt)=
{
def q(a:IntBigInt,b:IntBigInt):String=
{
if(a==0)
"Integer B is greater than A."
else
if(b==0)
"Integer A is greater than B."
else
q(a+1,b-1)
}
if(i!=j)q(i-j,i-j)else"A and B are equal"
}
val(a,b)=(readLine("A: ").toInt,readLine("B: ").toInt)
println(g(a,b))
}