刚学c# 书后练习遇到疑问 总是编译不通过 请帮我看下错在哪
我是刚刚开始学c#的 教科书后有这样一题 用控制台应用程序写一个 + - * /的4则运算计算器编写完后总是编译不通过 希望各位大虾能指点下我
程序如下
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication6
{
class mac
{
public int Num1;
public int Num2;
public int Da;
public char Oper;
public void Jia()
{
Num1 + Num2 = Da;
System.Console.WriteLine(Da);
}
public void Jian()
{
Num1 - Num2 = Da;
System.Console.WriteLine(Da);
}
public void Chen()
{
Num1* Num2 = Da;
System.Console.WriteLine(Da);
}
public void Chu()
{
Num1 / Num2 = Da;
System.Console.WriteLine(Da);
}
}
class Program
{
static void Main(string[] args)
{
mac c = new mac();
Console.WriteLine("input the num1");
c.Num1=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("input the oper");
c.Oper=Convert.ToChar(Console.ReadLine());
Console.WriteLine("input the num2");
c.Num2=Convert.ToInt32(Console.ReadLine());
if (c.Oper==+)
{
c.Jia;
}
else if (c.Oper==-)
{
c.Jian;
}
else if (c.Oper==*)
{
c.Chen;
}
else if (c.Oper==/)
{
c.Chu;
}
}
}
}