C#从给定的随机值中查找表达式 [英] C# Find expression from given random values

查看:81
本文介绍了C#从给定的随机值中查找表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建< g class =" gr_ gr_124 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep"数据-GR-ID =" 124" id =" 124"> c#application< / g>其中< g class =" gr_ gr_125 gr-alert
gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep"数据-GR-ID =" 125" ID = QUOT; 125">用户< / g取代;输入六个随机数和目标数,计算机生成< g class =" gr_ gr_126 gr-alert
gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep"数据-GR-ID =" 126" ID = QUOT; 126">表达式来; / g取代;如果他找不到目标号码,找到目标号码或离他最近!

I am creating <g class="gr_ gr_124 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="124" id="124">c# application</g> where <g class="gr_ gr_125 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="125" id="125">user</g> enters six random numbers and target number and computer makes <g class="gr_ gr_126 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="126" id="126">expression</g> to find target number or closest to him if he can't find target number!

例如

我不知道如何做这个?我创建了这个:https://pastebin.com/5YU6zhUp但它无法正常工作!有人可以帮帮我吗?是否需要回溯?

I have no idea how to make this? I created this: https://pastebin.com/5YU6zhUp but it doesn't work correctly! Can someone please help me? Is backtracking needed for this?

推荐答案

删除所有无关的HTML后,您的第一段是:

With all the extraneous HTML removed, your first paragraph is:

我正在创建c#应用程序,其中用户输入六个随机数和目标号码,如果找不到目标号码,计算机会表达以找到目标号码或离他最近!

请原谅我说这个,但这就是"找到"这个词的地方。含糊不清;目前还不清楚。我认为你的意思是确定。所以你是说用户输入六个数字加上一个要计算的数字,你的程序需要确定
如何使用这六个数字来获得要计算的数字?

Please excuse me for saying this, but this is where the word "find" is ambiguous; it is unclear. I think you mean determine. So are you saying that the user enters six numbers plus a number to be calculated and your program needs to determine how to use those six numbers to obtain the number to be calculated?


这篇关于C#从给定的随机值中查找表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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