1C#运算符的综合应用

it2025-11-27  7

//最后面都有源码的下载地址。

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;

namespace _1运算符综合应用 { class Program { static void Main(string[] args) { #region + - * / %(取余) ++ – += -= int num1 = 50; int num2 = 60; string str1 = “50”; string str2 = “60”;

//+ int result1 = num1 + num2; string result1_1 = str1 + str2; //- int result2 = num1 - num2; //* int result3 = num1 * num2; // / int result4 = num1 / num2; // % float result5 = num2 % num1; float result5_1 = 34.6f % 47.9f; //++ int a = 50; int b = 60; int c = a++; Console.WriteLine(a); Conso
最新回复(0)