為什么不對呢,寫上+ -不就對了?為什么運行正確輸出錯誤
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? double salary = 6000.00;//基本工資
? ? ? ? ? ? double prize = 3200.00;//獎金
? ? ? ? ? ? double tax = 4500.00;//交稅
? ? ? ? ? ? Console.WriteLine("我的工資獎金總額是{0}元",salary+prize);
? ? ? ? ? ? Console.WriteLine("我的稅后收入是{0}元",salary+prize-tax);
? ? ? ? }
? ? }
}
2022-08-27
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? double salary = 6000.00;//基本工資
? ? ? ? ? ? double prize = 3200.00;//獎金
? ? ? ? ? ? double tax = 4500.00;//交稅
? ? ? ? ? ? Console.Write("我的工資獎金總額是{0}元",salary+prize);
? ? ? ? ? ? Console.WriteLine("我的稅后收入是{0}元",salary+prize-tax);
? ? ? ? }
? ? }
}