Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Random number generator With IF's that sometimes cant count
//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 rdm = new Random(); int Value = rdm.Next(1,13); Console.WriteLine("This is a number between 1 - 10"); Console.WriteLine(Value); if (Value > 10) { Console.WriteLine("oops, I can't count"); Console.ReadLine(); } Console.WriteLine("This is the number doubled itself"); Console.WriteLine(Value + Value); Console.WriteLine("This is the Value multiplied by itself"); Console.WriteLine(Value * Value); if (Value < 5) { Console.WriteLine("This value is less than half way"); Console.ReadLine(); } if (Value == 5) { Console.WriteLine("This Value is half way"); Console.ReadLine(); } if (Value > 5) { Console.WriteLine("This Value is over half way"); Console.ReadLine(); } } } }
run
|
edit
|
history
|
help
0
learning1
BreakNum
PYRAMIDPATTERN
Given a list of numbers and a number k, return whether any two numbers from the list add up to k
money
Print Matrix To Screen (with little pretty box)
c#
svsvsvsvsv
Examples of JS-Like higher-order functions in C#
dima