# This program computes the hcf of two numbers. Both of them # are not 0. def hcfI(sml, lrg): while sml > 0: sml, lrg = lrg%sml, sml return lrg def hcfR(sml, lrg): if sml == 0: return lrg return hcfR(lrg%sml, sml) def main(): s = input("Enter a positive integer: ") l = input("enter the second +ve integer: ") print "hcf(", s, ",", l, ") =", hcfI(s,l) print "hcf(", s, ",", l, ") =", hcfR(s,l) main()