哪位帥哥美女知道我為什么錯(cuò)?
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? double price = 4388;//手機(jī)的售價(jià)
? ? ? ? ? ? double salary = 4978.67;//本月實(shí)發(fā)工資
? ? ? ? ? ? if(price >= salary) ??
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("這月工資夠買手機(jī)!");
? ? ? ? ? ? }//請(qǐng)?jiān)谶@里補(bǔ)充條件判斷
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WrinteLine("這月工資不夠買手機(jī)!");
? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.ReadLine();
? ? ? ? }
? ? }
}
2019-10-13
Write寫錯(cuò)了
2019-10-12
謝謝帥哥美女,除了這些問題 ?因?yàn)槲以诰W(wǎng)頁上不能打出中文 會(huì)有亂文 ?所以我在粘貼復(fù)制題目的中文 將感嘆號(hào)也復(fù)制進(jìn)去 后來我才發(fā)現(xiàn) 感嘆號(hào)也是有份中文和英文的 ?這也是一個(gè)錯(cuò)誤點(diǎn)
2019-10-12
Console.WrinteLine? ?寫錯(cuò)了,多了個(gè)n,?應(yīng)該是? Console.WriteLine
2019-10-11
price是手機(jī)的售價(jià);salary是本月實(shí)發(fā)工資
你要salary>=price才能買吧
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? double price = 4388;//手機(jī)的售價(jià)
? ? ? ? ? ? double salary = 4978.67;//本月實(shí)發(fā)工資
? ? ? ? ? ? if(salary>= price?) ??
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("這月工資夠買手機(jī)!");
? ? ? ? ? ? }//請(qǐng)?jiān)谶@里補(bǔ)充條件判斷
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WrinteLine("這月工資不夠買手機(jī)!");
? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.ReadLine();
? ? ? ? }
? ? }
}