Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
30272 Program Ex7_2 switch
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Console.WriteLine("กรุณากรอกคะแนนสอบ : "); int score = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("คุณได้คะแนน : "+ score); switch (score) { case int n when (n >= 0 && n < 50): Console.WriteLine("เกรด 0"); break; case int n when (n >= 50 && n < 60): Console.WriteLine("เกรด 1"); break; case int n when (n >= 60 && n < 70): Console.WriteLine("เกรด 2"); break; default : Console.WriteLine("เกรด 4"); break; } } } }
run
|
edit
|
history
|
help
0
dsdsfdfgdfgfgfg
Byte array to base 64 string
fracOp
SHA tester
Concurrent bag ex
mendozaeject
pattern2
qw
newDivQ DONE - adding UniqueShuffle
How to use Lambda expression wiht generic delegate