ZeroDivisionError:整数除法或以零为模 [英] ZeroDivisionError: integer division or modulo by zero

查看:3894
本文介绍了ZeroDivisionError:整数除法或以零为模的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

编译时出现以下错误.如果有人知道原因,请告诉我.

我正在使用C语言,python

ZeroDivisionError:整数除法或以零为模


问候,
Arang.

hello friends,

I am getting the following error while compiling. If any body knows the reason the please let me know.

I am using C language, python

ZeroDivisionError: integer division or modulo by zero


regards,
Arang.

推荐答案

原因?您将某物除以零.

编译器会给您一个行号吗?如果是这样,那么该行的代码是什么样的?
the reason? you''re dividing something by zero.

does the compiler give you a line number? if so, what does the code at that line look like?


错误消息是不言自明的:您正在将值除以零(或取其模数).
如果错误报告一行,请查看该行.如果没有,请尝试在调试器中运行它,看看它能走多远.
The error message is self explanatory: You are dividing (or taking the modulus of) a value by zero.
If the error reports a line, look at it. If it doesn''t, try running it in the debugger and see how far it gets.


谢谢克里斯,正如您所说的,我将某物除以零.编译器说一些行号.我检查并更正.
Thank you Chris, as you said that I divided something by zero. Compiler said some line number. I checked and I corrected it.


这篇关于ZeroDivisionError:整数除法或以零为模的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆