html5|2021-10-08

彭翔

html5|2021-10-08
文章图片

运算符 定义三个整形变量a、b和c,并分别为a、b赋值1和2,然后做运算,并把结果赋值给c

    1. using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      【html5|2021-10-08】namespace _10._8作业
      {
      class Program
      {
      static void Main(string[] args)
      {
      int a = 1;
      int b = 2;
      int c;
      c = a + b;
      Console.WriteLine(c);
      c = b - a;
      Console.WriteLine(c);
      c = a % b;
      Console.WriteLine(c);
      c = a / b;
      Console.WriteLine(c);
      }
      }
      }

    推荐阅读