For example:
(1 + 1) - 1=1
1>=1=true
1 * 1=1
Need is literally in the text box input can return the final results, you can use the script, but don't know how to call VB
CodePudding user response:
https://www.cnblogs.com/leischen/archive/2012/03/30/2425601.htmlCodePudding user response:
https://blog.csdn.net/zanfeng/article/details/77836675CodePudding user response:
Using System;
Using System. Collections. Generic;
using System.Data;
The namespace ConsoleApp1
{
Class Program
{
Public class Calculator
{
The static void Main (string [] args)
{
The string expression;
The Console. Write (" input formula: ");
Expression=Console. ReadLine ();
Console. WriteLine (new to the DataTable (). Compute (expression, null));
}
}
}