随机数发生器 [英] Random Numbers Generator

查看:79
本文介绍了随机数发生器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,很抱歉发布了这么多问题。我是一个新手,但我想学习:D

关于SammyB代码:

Hi All, sorry for posting so many questions. Im a newbie but im trying to learn :D
With Regards to SammyB Code :

展开 | 选择 | 换行 | 行号

推荐答案


大家好,很抱歉发布了这么多问题。我是一个新手,但我想学习:D

关于SammyB代码:

Hi All, sorry for posting so many questions. Im a newbie but im trying to learn :D
With Regards to SammyB Code :

展开 | 选择 | 换行 | 行号


问题是您将这些数字存储在整数变量中,该变量只能包含整数。它们四舍五入到最接近的整数,在本例中为零。尝试使用其他数字数据类型,如Single。
The problem is that you are storing these numbers in an Integer variable, which can only hold whole numbers. They are rounded to the nearest integer, which in this case is zero. Try using another numeric data type such as Single.



问题是您将这些数字存储在整数变量,只能包含整数。它们四舍五入到最接近的整数,在本例中为零。尝试使用其他数字数据类型,如Single。
The problem is that you are storing these numbers in an Integer variable, which can only hold whole numbers. They are rounded to the nearest integer, which in this case is zero. Try using another numeric data type such as Single.



之前我曾尝试将它改为双和单,但它也不起作用..它也给了我零

Previously i have tried changing it the double and single as well but it doesnt work also.. It gave me zero too


这篇关于随机数发生器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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