## Scala, 108 <strike>129</strike> characters ## def g(i:Int,j:Int)={def q(a:Int,b:Int):Boolean={if(a==0)false else if(b==0)true else q(a+1,b-1)};q(i-j,i-j)} Ungolfed: def g(i:Int,j:Int)= { def q(a:Int,b:Int):Boolean= { if(a==0) false else if(b==0) true else q(a+1,b-1) } q(i-j,i-j) } Returns true if the first value is greater than the second, otherwise returns false. There's probably a better way than this. **Edit:** Based on the revised question: object G extends App { def g(i:Int,j:Int)= { def q(a:Int,b:Int):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)) }