這到底哪里有錯,找不出來
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? double money = 60000.00;//存款金額
? ? ? ? ? ? if(money>=10000)
? ? ? ? ? ? {
? ? ? ? ? ? ? ?if(money>=50000)
? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ?if(money>=100000)
? ? ? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ? ? ?Console.WriteLine("送一臺微波爐");
? ? ? ? ? ? ? ? ? ?}else{
? ? ? ? ? ? ? ? ? ? ? ?Console.WriteLine("送一套茶具");
? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ?}else{
? ? ? ? ? ? ? ? ? ?Console.WriteLine("送一袋大米");
? ? ? ? ? ? }else {
? ? ? ? ? ? ? ? Console.WriteLine("沒有禮品");
? ? ? ? ? ? }//請?jiān)谶@里補(bǔ)充多重條件判斷
? ? ? ? }
? ? }
}
2023-05-10
2022-10-26
你可以對照一下,50000那個(gè)符號應(yīng)該是英文模式下的,你寫成中文的了,另外就是把
else {
? ? ? ? ? ? ? ? Console.WriteLine("沒有禮品");
? ? ? ? ? ? }//請?jiān)谶@里補(bǔ)充多重條件判斷
放到倒數(shù)第三個(gè) } 后再加個(gè) }
2022-10-26
using System;
using System.Collections.Generic;
using System.Text;
namespace FirstConsoleApp
{
? ? internal class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? double money = 60000.00;//存款金額
? ? ? ? ? ? if (money >= 10000)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? if (money >= 50000)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? if (money >= 100000)
? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? Console.WriteLine("送一臺微波爐");
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? Console.WriteLine("送一套茶具");
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("送一袋大米");
? ? ? ? ? ? ?}
? ? ? ? ? ??
? ? ? ? ? ?}else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("沒有禮品");
? ? ? ? ? ? }//請?jiān)谶@里補(bǔ)充多重條件判斷
? ? ? ? }
? ? }
}
我這個(gè)應(yīng)該是對的