随机生成器为九个数字 [英] Random Generator for nine numbers

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

问题描述




我正在尝试在visual c#2005中为Windows应用程序生成九个随机数。用户无需输入。所需要的只是九个随机整数。任何帮助都会被欣赏

Hi,

I''m trying to generate nine random numbers in visual c# 2005 for a windows application. No input will be needed from the user. All that is needed is the nine random integers. Any help will be appreciatied

推荐答案

到目前为止你做了什么?你应该能够做一些像Random.nextInt这样的事情并继续获得更多的内容。
What have you done so far? You should just be able to do something like Random.nextInt and keep getting more ints.


Dim MyInteger As Integer

随机化

MyInteger = CInt(Int((9 * Rnd())+ 1))
Dim MyInteger As Integer
Randomize
MyInteger = CInt(Int((9 * Rnd()) + 1))


你遇到什么问题或错误?
What problem or error are you getting?


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

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