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 Aufgabe7_SaLeiendecker
- {
- class Program
- {
- static void Main(string[] args)
- {
- Char Ein;
- int i = 1;
- int j = 1;
- char[] Zahl;
- Zahl =new char[4];
- bool VVV = false;
- bool BBB = false;
- bool FFF = false;
- bool LLL = false;
- for (j = 1; j < 4; j++)
- {
- Console.WriteLine("Versuch {0}:", j);
- for (i = 0; i < 4; i++)
- {
- Console.WriteLine("Bitte geben Sie einen Buchstaben ein.");
- Ein = Convert.ToChar(Console.ReadLine());
- Zahl[i] = Ein;
- if (Zahl[i] == 0x76 || Zahl[i] == 0x56)
- {
- VVV = true;
- }
- if (Zahl[i] == 0x66 || Zahl[i] == 0x46)
- {
- FFF = true;
- }
- if (Zahl[i] == 0x6c || Zahl[i] == 0x4c)
- {
- LLL = true;
- }
- if (Zahl[i] == 0x62 || Zahl[i] == 0x42)
- {
- BBB = true;
- }
- }
- if (VVV == true && BBB == true && FFF == true && LLL == true)
- {
- Console.WriteLine("Login korrekt.");
- j = 4;
- }
- else
- {
- Console.WriteLine("Login fehlgeschlagen.");
- VVV = false;
- BBB = false;
- FFF = false;
- LLL = false;
- }
- }
- //VFLB Original PW
- //0x76 = v
- //0x66 = f
- //0x6c = l
- //0x62 = b
- //V = 0x56
- //F = 0x46
- //L = 0x4c
- //B = 0x42
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement