Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NationalCode
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Random random = new Random(); string str = ""; int num = 0; double num2 = 0.0; double num3 = 0.0; int[] numArray = new int[11]; numArray[2] = random.Next(0, 9); numArray[3] = random.Next(0, 9); numArray[4] = random.Next(0, 9); numArray[5] = random.Next(0, 9); numArray[6] = random.Next(0, 9); numArray[7] = random.Next(0, 9); numArray[8] = random.Next(0, 9); numArray[9] = random.Next(0, 9); numArray[10] = random.Next(0, 9); str = numArray[10].ToString() + numArray[9].ToString() + numArray[8].ToString() + numArray[7].ToString() + numArray[6].ToString() + numArray[5].ToString() + numArray[4].ToString() + numArray[3].ToString() + numArray[2].ToString(); for (int i = 2; i <= 10; i++) { num += numArray[i] * i; } num2 = num / 11; num3 = num % 11; if (num3 < 2.0) { Console.WriteLine(str + num3.ToString()); } else { Console.WriteLine(str + ((11.0 - num3)).ToString()); } } } }
run
|
edit
|
history
|
help
0
starpattern
YRHBD XDXS
Test
count the occurrence of each distinct item in the array - Seeni
C# .ToInt() Extension Method Example
radix sort
Unix timestamp to DateTime
give coins
simple hello world
Math 10.5 (Added simult 4x4)