如何在Visual Basic中放置公式条件 [英] How to put a formula condition in Visual basic

查看:74
本文介绍了如何在Visual Basic中放置公式条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

x = y + 7 Mod 10(4位数字)

示例:输入为1234
答案:8901

x = y + 7 Mod 10 with 4digits

example: the input is 1234
Answer: 8901

how will i get to that answer?

推荐答案

Imports System.Console
Module Module1

Sub Main()
    Write(IncBySevenModTen(1))
    Write(IncBySevenModTen(2))
    Write(IncBySevenModTen(3))
    Write(IncBySevenModTen(4))
End Sub




公共函数IncBySevenModTen(输入为整数)
返回(x + 7)Mod 10
最终功能


希望你能得到我的帮助!

干杯,

Manfred




Public Function IncBySevenModTen(input as Integer)
Return (x + 7) Mod 10
End Function


I hope you get my drift!

Cheers,

Manfred


输入不是1234.它是数字序列1、2、3、4,输出是8、9、0、1.这就是为什么真让人迷惑.
The input is not 1234. It''s a sequence of numbers, 1, 2, 3, 4 with the output being 8, 9, 0, 1. That''s why it''s so confusing to people.


这篇关于如何在Visual Basic中放置公式条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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