求高手帮我做个简单的VB程序Divide the number with 2.Convert the result to an integer.Multiply this integer with 2.If the product is equal to the original number,it is an even number,otherwise it is an odd number.To convert a number to an i

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/13 03:28:42

求高手帮我做个简单的VB程序Divide the number with 2.Convert the result to an integer.Multiply this integer with 2.If the product is equal to the original number,it is an even number,otherwise it is an odd number.To convert a number to an i
求高手帮我做个简单的VB程序
Divide the number with 2.Convert the result to an integer.Multiply this integer with 2.If the product is equal to the original number,it is an even number,otherwise it is an odd number.
To convert a number to an integer you can use the function int(x) which returns the integer part of a value x.

求高手帮我做个简单的VB程序Divide the number with 2.Convert the result to an integer.Multiply this integer with 2.If the product is equal to the original number,it is an even number,otherwise it is an odd number.To convert a number to an i
大体伪代码框架如下
y = int(x);
if(y/2*2 == y)
even()
else
odd()
另,这算法好傻,最快判断奇偶的话,只需要看整数的最后1位是0还是1就行了(因为计算机用的是二进制数)

求高手帮我做个简单的VB程序Divide the number with 2.Convert the result to an integer.Multiply this integer with 2.If the product is equal to the original number,it is an even number,otherwise it is an odd number.To convert a number to an i 十万火急!急求VB高手帮我做一下这倒程序改错题,每个FOUND的下一行都有错误,请改正!'【程序改错】'------------------------------------------------'题目:以下程序段用于输出100-300的所有素数'------------ 能不能帮我做个VB简单的计算公式,谢谢 我想编一个vb程序,16个数字去除3个最大数和3个最小数后求剩余的十个数的平均值.平均值保留小数点后一位麻烦高手能够帮我编写一下代码. 在图片框中显示一个n*n魔方阵(其中n必须是奇数).魔方阵的每一行,每一列对角线之和均相等.跪求 ,VB 高手帮小弟 做个n*n魔方阵程序, 编写T-SQL程序计算1*3*5*7*...*n 的乘积首次超过10000的乘积及其n值 求高手帮小弟看看!急.麻烦高手做个我看看.做了很久都没有实现 帮我做个题目好么?已知三角形底和高,求三角形面积?书面的是VB的, 求英语高手帮我做个短文填空 谁帮我做一个VB求总评程序,期中成绩x占30%,期末成绩y占30%,平时成绩z占40%,VB程序,代码也可以. 求一位电脑上有SPSS软件的高手 帮我的数据做一份简单的SPSS处理 求电子表格高手.帮我做一个简单的电子表格 1-9 9个数字 按照我算好的方式排列.排列方式如下:123456712345891236789145678923456781234569123478912567893456789条件是1-9的数字 任意我定. 帮我做10个非常简单的英语选择题 能否帮忙编个VB程序,计算任意一个正整数n的阶乘,我知道你是高手,能否免费帮忙一次啊, 求高手帮我做几道c++的题,17、以下程序段if(x-- 谁能帮我用VB设计一个简单的程序:计算正方形的面积(详细点) 谁能帮我用VB设计一个简单的程序:计算正方形的面积(详细点) 用vb写牛顿迭代法程序解方程用牛顿迭代法解此方程,请高手帮我写个完整程序,本人菜鸟,写出的表达式老是编译错误.f(x) = (0.366 * q / m / s) * Log(10 * s * sqr(x) / r) - x式中:q,m,s,r都是常量计算 求高手帮我设计个英文名我叫:小枫.求高手帮我设计一个英文网名.简单好记的.最好怎么念的能用中文标名下,我英文太差劲了.