課程
/后端開發(fā)
/C#
/C#開發(fā)輕松入門
如何自己選擇
2016-07-15
源自:C#開發(fā)輕松入門 3-2
正在回答
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? int score = 94;//分?jǐn)?shù)
? ? ? ? ? ? if(score>95)//判斷
? ? ? ? ? ? ? ? {//分支1
? ? ? ? ? ? ? ? ? ? Console.WriteLine("獎(jiǎng)勵(lì)一輛自行車");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? else//分支2
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ?Console.WriteLine("要啥自行車");
? ? ? ? }
? ? }
}
現(xiàn)在你應(yīng)該知道了吧,告訴我們唄= =我也是輸入94的時(shí)候還是顯示獎(jiǎng)勵(lì)
看看是不是在if語句后面加了分號“;”?
if (score>95)
你可能寫成了if(score>=95)
慢走
是不是帶等號了?
這個(gè)有沒有代碼呢?
舉報(bào)
本門課程是C#語言的入門教程,將帶你輕松入門.NET開發(fā)
9 回答不知道為什么我輸出的是輸出錯(cuò)誤
1 回答輸出結(jié)果為什么只有一個(gè)??
1 回答輸出(Console.Write), 輸入(Console.Read) 到底是什么 不太懂
3 回答輸入大于10的數(shù)字時(shí),第一個(gè)if 和else都輸出了,怎么回事
3 回答這個(gè)為什么輸出不對
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2019-10-23
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? int score = 94;//分?jǐn)?shù)
? ? ? ? ? ? if(score>95)//判斷
? ? ? ? ? ? ? ? {//分支1
? ? ? ? ? ? ? ? ? ? Console.WriteLine("獎(jiǎng)勵(lì)一輛自行車");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? else//分支2
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ?Console.WriteLine("要啥自行車");
? ? ? ? ? ? ? ? }
? ? ? ? }
? ? }
}
2017-12-25
現(xiàn)在你應(yīng)該知道了吧,告訴我們唄= =我也是輸入94的時(shí)候還是顯示獎(jiǎng)勵(lì)
2017-10-12
看看是不是在if語句后面加了分號“;”?
2016-07-16
if (score>95)
{
}
你可能寫成了if(score>=95)
2016-07-15
是不是帶等號了?
2016-07-15
這個(gè)有沒有代碼呢?