Advertisement
Guest User

loto

a guest
Nov 19th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp20
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             //Skapa vektor
  14.             int[] brojevi = new int[10];
  15.             for (int i = 0; i < 10; i++) ;
  16.                 Console.WriteLine("Skrev en helltal mellan 1 och 25");
  17.                 string giss = Console.ReadLine();
  18.                brojevi [i] = Convert.ToInt32(giss);
  19.             if (brojevi[i] < 1 || brojevi[i] > 25)
  20.             {
  21.                 Console.WriteLine("Fel! Tal är inte mellan 1 och 25!");
  22.                 i--;
  23.             }
  24.             //Finns matchning?
  25.             //kolla för matchning
  26.             // Random randomerare = new Random();
  27.             // int slump_tal = randomerare.Next(1, 25);
  28.             // int giss1;
  29.             //for (brojevi[i] != slump_tal);
  30.             // Console.WriteLine("Din kombinationen är:" + brojevi[i]);  
  31.             // Console.WriteLine("Grattis!");
  32.  
  33.             Console.ReadKey();
  34.  
  35.  
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement