-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
27 lines (26 loc) · 735 Bytes
/
Program.cs
File metadata and controls
27 lines (26 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Linq;
namespace LogicParser
{
class Program
{
static void Main(string[] _)
{
Console.WriteLine("Enter a logical expression (or exit to exit):");
string inp;
Expression e;
while ((inp = Console.ReadLine()) != "exit")
{
if (inp != "random")
e = Expression.Parse(inp);
else
e = Expression.RandomExpression(5);
Console.WriteLine();
e.PrintTable();
e.Prove();
e.Simplify();
Console.WriteLine("Enter a logical expression (or exit to exit):");
}
}
}
}