彭翔
运算符
定义三个整形变量a、b和c,并分别为a、b赋值1和2,然后做运算,并把结果赋值给c
-
-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;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);
}
}
}
-