Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- // HÄR VÄLJER DU LÖSENORD OCH ANVÄNDAR NAMN SOM DU SENARE ANVÄNDER FÖR ATT LOGGA IN
- Console.Write("Välkommen till Eriks lilla program. (Tryck 'Enter' för att fortsätta)");
- Console.ReadKey();
- Console.Clear();
- Console.Write("Mata in ett användarnamn: ");
- string UserName;
- UserName = Console.ReadLine();
- Console.Clear();
- Console.Write("Mata in ett lösenord: ");
- string PassWord;
- PassWord = Console.ReadLine();
- Console.Clear();
- //HÄR ÄR HUVUDMENYN
- string Val1 = "1";
- Console.Write("VAD VILL DU GÖRA?");
- Console.WriteLine("");
- Console.WriteLine("1. LOGGA IN 2. STÄNG AV");
- string MenyVal;
- MenyVal = Console.ReadLine();
- if (MenyVal == Val1)
- {
- Console.Clear();
- Console.Write("USERNAME: ");
- string UserName2 = Console.ReadLine();
- if (UserName == UserName2)
- {
- Console.Clear();
- Console.Write("PASSWORD: ");
- string PassWord2 = Console.ReadLine();
- if (PassWord == PassWord2)
- {
- Console.Clear();
- Console.Write("ACCESS GRANTED!");
- Console.ReadKey();
- }
- }
- else
- {
- Console.Clear();
- Console.Write("PASSWORD: ");
- string FAIL = Console.ReadLine();
- Console.Clear();
- Console.Write("ACCESS DENIED!");
- Console.ReadKey();
- }
- }
- else
- {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement