?? program.cs
字號:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace Example3_12 {
class Program {
static void Main(string[] args) {
Console.WriteLine("輸入你的姓名代號:");
Console.WriteLine("(1) 張三;(2) 李四;(3) 王五");
int myData = Convert.ToInt32(Console.ReadLine());
switch (myData) {
//當輸入的姓名代號為1時
case 1:
Console.WriteLine("張三的成績為86");
break;
//當輸入的姓名代號為2時
case 2:
Console.WriteLine("李四的成績為79");
break;
//當輸入的姓名代號為3時
case 3:
Console.WriteLine("王五的成績為95");
break;
//當輸入的姓名代號是其他時
default:
Console.WriteLine("沒有你的考試成績!");
break;
}
Console.ReadLine();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -