Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
recur 4
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static readonly Random rand = new Random(); public static void Main(string[] args) { //Your code goes here //Recursive(4,.53); /* double a = 362.3; int b = (int) a/10%10; Console.WriteLine(b); */ Console.WriteLine(RandomDouble()); for (int i = 0; i<100; i++) { //Console.Write("{0, 1}", rand.Next(0,10), RandomInt(0,10)); //Console.Write("{0} ", rand.Next(4,9)); } Console.WriteLine(); for (int i = 0; i<40; i++) { Console.WriteLine(RandomInt(1,366)); } /*double x=2; for (int i=0; i<100; i++){ x=x*1.2; Console.WriteLine(x); }*/ } /*public static double Recursive(double r, double x) { double x2=x; double x3; for (int i=0; i<rand.Next(150,200); i++) { x=x2; x2=r*x*(1-x); return x2; } return } public static double Recur( double r, double x) { }*/ public static long Geo(long x, int times){ int n=2; if (times<=1){ return x; } return Geo(x*n, times-1); } public static double Geo(double x, int times){ double r=4; if (times<=1){ return r*x*(1-x); } return Geo(r*x*(1-x), times-1); } public static double RandomDouble(){ int count = rand.Next(100,300); double x = rand.NextDouble(); return Geo(x,count); } public static int RandomInt(int lower, int upper){ return Convert.ToInt32(RandomDouble()*(upper-lower-1)+lower); } } }
run
|
edit
|
history
|
help
0
Sum Matrix Row
test array with c#
הארות אופן שימוש
FIBNOCHI
Calculadora
Jjjj
Planet-D
C# constructor in inheritance
30272 Program Ex4 if
Quarter Hour String Generator