Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
30272 Program Ex7_1 switch_int
//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; } } } }
run
|
edit
|
history
|
help
0
axcc szxscd
Intuit // C# // listing_4.4 (StreamReader // output.txt + Convert/Parse)
Random Integers
dynamic in C#
last ie
Reverse String in for loop
12
Fibonacci recursion
Simple Enum Parsing
GetMyAppintmentData