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
Sum of digits in a string
OOP vs DOD
2 3
bla bla
tamrin
Tarkov Time
sdfghnjmkuyhtgrfed
OOOO1
Today's work
Raiz Cuadrada