Exemplo n.º 1
0
        public string generateStars()
        {
            Stack<int> numbers = new Stack<int>();
            List<int> list = new List<int>();
            Return = "";
            int num = rand.Next(1, 10 + 1);
            numbers.Push(num);
            num = rand.Next(1, 10 + 1);
            numbers.Push(num);

            list = numbers.ToList();
            list.Sort();
            foreach (int i in list)
            {
                Return += "  *" + i;
            }
            return Return;
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Stack stack = new Stack();
            do
            {

                do
                {

                } while ( != 52);
            } while ( != 4);
           
            // 2 looppia ulkona maat(1-4)
                // numerot
                    // luo kortti
                    // lisää pakkaan

            
        }
Exemplo n.º 3
0
        public string generateLotto(int max, int count)
        {
            Stack<int> numbers = new Stack<int>();
            List<int> list = new List<int>();
            Return = "";
            do
            {
                int num = rand.Next(1, max + 1);
                numbers.Push(num);

                count--;
            } while (count > 0);

            list = numbers.ToList();
            list.Sort();
            foreach (int i in list)
            {
                Return += "   " + i;
            }
            return Return;
        }