现在的位置: 首页 > 综合 > 正文

强大的Python大数四则运算

2013年10月30日 ⁄ 综合 ⁄ 共 223字 ⁄ 字号 评论关闭
#!/usr/bin/python
import sys
running = True
while running:
        try:
                t = int(raw_input())
                p = int(raw_input())
        except EOFError:
                break
        print 'operator + result \n', t+p
        print 'operator - result \n', t-p
        print 'operator * result \n', t*p
        print 'operator / result \n', t/p

抱歉!评论已关闭.