如何从控制台代码编辑此错误 [英] How edit this ERROR from console code
本文介绍了如何从控制台代码编辑此错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此错误:
http://upload7.ir/imgs/2014- 09 / 03509227152873171292.png [ ^ ]
推荐答案
在使用之前指定fact = 1.
assign fact=1 before using it.
你乘以fact
带有另一个值,但是在代码事实
中的那一点尚未初始化,因此它不包含有效数字。您应该在循环之前添加初始化语句,例如:
You are multiplyingfact
with another value, but at that point in your codefact
has not been initialised so it does not contain a valid number. You should add an initialisation statement before your loop, something like:
fact = 1;
// your loop starts here
此外,将来请将代码和错误消息发布到您的问题中,而不是链接到屏幕截图。
Also, in future please post you code and the error message into your question, rather than a link to a screen shot.
Public static int在使用
Public static int fact =0 before using
这篇关于如何从控制台代码编辑此错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文