奇数或偶数 [英] Odd or Even

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

问题描述

晚上好,


有没有人知道如何在Visual Studio的Visual Basic组件中找出值是奇数还是

2005.我找到了

数学和信息工具,它们提供了其他Microsoft软件包(如Excel)中的一些常用功能

;但是基本的功能

就像Odd and Even躲避我一样。


我们非常感谢您提供的任何帮助。

您真诚的,


威廉福斯特


***通过开发人员发送索引 http://www.developersdex.com ***

Good evening all,

Does anyone know how to find out whether a value is either odd or even
in the Visual Basic component of Visual Studio 2005. I have found the
Math and Information tools which provide some of the common functions
within other Microsoft packages such as Excel; however basic functions
like Odd and Even elude me.

Any assistance you may be able to provide would be greatly appreciated.

Yours sincerely,

William Foster

*** Sent via Developersdex http://www.developersdex.com ***

推荐答案




Dim strOddEven As String = IIf((100 Mod 2)= 0,Even,Odd)

Ken

-----------------

William Foster <无**** @ devdex.com>在消息中写道

新闻:Ol ************* @ TK2MSFTNGP09.phx.gbl ...
Hi,

Dim strOddEven As String = IIf((100 Mod 2) = 0, "Even", "Odd")
Ken
-----------------
"William Foster" <no****@devdex.com> wrote in message
news:Ol*************@TK2MSFTNGP09.phx.gbl...
晚上好,

有谁知道如何在Visual Studio 2005的Visual Basic组件中找出值是奇数还是偶数。我找到了
数学和信息工具提供了一些其他Microsoft软件包(如Excel)中的常用功能;然而基本功能就像Odd和Even一样无法实现。

您可能提供的任何帮助都将非常感谢。

您诚挚的,

威廉福斯特

***通过开发人员指南 http:// www.developersdex.com ***



Ken,


谢谢您快速回复,你不知道有多少傻傻的

引用有奇怪的甚至在Visual Studio帮助中,它

让我很生气。


你诚挚的,


William Foster


***通过开发人员发送索引 http://www.developersdex.com ***
Ken,

Thank you for the quick reply, you have no idea how many silly
references there are to odd and even within the Visual Studio help, it
was driving me quite mad.

Yours sincerely,

William Foster

*** Sent via Developersdex http://www.developersdex.com ***


"威廉福斯特<无**** @ devdex.com> schrieb:
"William Foster" <no****@devdex.com> schrieb:
有没有人知道如何在Visual Studio 2005的Visual Basic组件中找出值是奇数还是奇数
。我找到了
数学和信息在Excel等其他Microsoft软件包中提供一些常用功能的工具;然而基本功能就像Odd和Even一样躲避我。
Does anyone know how to find out whether a value is either odd or even
in the Visual Basic component of Visual Studio 2005. I have found the
Math and Information tools which provide some of the common functions
within other Microsoft packages such as Excel; however basic functions
like Odd and Even elude me.




\\\

如果i Mod 2 = 0然后

MsgBox(偶数。)

Else

MsgBox(奇数。)

结束如果

///


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://classicvb.org/petition/>



\\\
If i Mod 2 = 0 Then
MsgBox("Even.")
Else
MsgBox("Odd.")
End If
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


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

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