課程
/后端開(kāi)發(fā)
/C#
/C#開(kāi)發(fā)輕松入門
else怎么添加?。????
2016-07-19
源自:C#開(kāi)發(fā)輕松入門 3-2
正在回答
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? int score = 96;//分?jǐn)?shù)
? ? ? ? ? ? if (score > 95)//判斷
? ? ? ? ? ? {//分支1
? ? ? ? ? ? ? ? Console.WriteLine("獎(jiǎng)勵(lì)一輛自行車");
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {//分支2
? ? ? ? ? ? ? ? Console.WriteLine("一頓打");
? ? ? ? }
? ? }
}
愛(ài)吃瓜皮的腦斧
if()
{}
else
if 和else啊
舉報(bào)
本門課程是C#語(yǔ)言的入門教程,將帶你輕松入門.NET開(kāi)發(fā)
1 回答2—19課任務(wù)怎么做,怎么添加?
1 回答添加加減號(hào)和添加變量什么區(qū)別
1 回答求解,這里怎么加 ; 后完全不同
2 回答if 與else之間,什么時(shí)候加{},什么時(shí)候不加啊
1 回答4-2 怎么添加其他字符串到輸出
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-11-23
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? int score = 96;//分?jǐn)?shù)
? ? ? ? ? ? if (score > 95)//判斷
? ? ? ? ? ? {//分支1
? ? ? ? ? ? ? ? Console.WriteLine("獎(jiǎng)勵(lì)一輛自行車");
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {//分支2
? ? ? ? ? ? ? ? Console.WriteLine("一頓打");
? ? ? ? ? ? }
? ? ? ? }
? ? }
}
2016-09-02
if()
{}
else
{}
2016-07-19
if 和else啊