Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
30272 Program Ex5 if_else_odd_even
//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); double result = score % 2; if (result == 1) Console.WriteLine(score+" เป็นจำนวนคี่"); else Console.WriteLine(score+" เป็นจำนวนคู่"); } } }
run
|
edit
|
history
|
help
0
extrefGenerate
vcdgdfgdfdfd
Armstrong
ProgramDemo
sdfrgthyjuytrfdf
SVSVSV
asxs
SKYIES
Sum
First code