問(wèn)新手的問(wèn)題:找出錯(cuò)誤點(diǎn)
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ī)!")
? ? ? ? ? ?}
? ? ? ? ? ?else
? ? ? ? ? ?{
? ? ? ? ? ? ? ?Console.WriteLine("這個(gè)月工資不夠買手機(jī)!")
? ? ? ? ? ?}
? ? ? ? }
? ? }
}
2019-05-06
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ī)!");
? ? ? ? ? ?}
? ? ? ? ? ?else
? ? ? ? ? ?{
? ? ? ? ? ? ? ?Console.WriteLine("這個(gè)月工資不夠買手機(jī)!");
? ? ? ? ? ?}
? ? ? ? }
? ? }
}
14行和18行處缺失';'