fork(2) download
  1. numerator = input("Numerator = ")
  2. numerator = int(numerator)
  3. denominator = input("Denominator = ")
  4. denominator = int(denominator)
  5. if abs(numerator) >= abs(denominator) :
  6. whole = numerator // denominator
  7. new_numerator = (numerator % denominator)
  8. new_numerator = round(new_numerator)
  9. print('%s + %s / %s' % (whole, new_numerator, denominator))
  10. else : print("%s/%s" % (numerator, denominator))
Runtime error #stdin #stdout #stderr 0.03s 9984KB
stdin
Standard input is empty
stdout
Numerator = 
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
EOFError: EOF when reading a line