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 Projekt1
- {
- class Programm{
- static void Main(string[]args)
- {
- Console.WriteLine("Geben Sie ihr Passwort ein: ");
- char p1 = 'a';
- char p2 = 'u';
- char p3 = 't';
- char p4 = 'o';
- char c1= Char.ToLower.Console.Readline(c1) == p1;
- char c2= Char.ToLower.Console.Readline(c2) == p2;
- char c3= Char.ToLower.Console.Readline(c3) == p3;
- char c4= Char.ToLower.Console.Readline(c4) == p4;
- switch(c1) {
- case 'a':
- c1==p1;
- break;
- case 'u':
- c1== p2;
- break;
- case 't':
- c1== p3;
- break;
- case 'o':
- c1== p4;
- break;
- }
- switch(c2) {
- case 'a':
- c2== p1;
- break;
- case 'u':
- c2== p2;
- break;
- case 't':
- c2== p3;
- break;
- case 'o':
- c2== p4;
- break;
- }
- switch(c3) {
- case 'a':
- c3== p1;
- break;
- case 'u':
- c3== p2;
- break;
- case 't':
- c3== p3;
- break;
- case 'o':
- c3== p4;
- break;
- }
- switch(c4) {
- case 'a':
- c4== p1;
- break;
- case 'u':
- c4== p2;
- break;
- case 't':
- c4== p3;
- break;
- case 'o':
- c4== p4;
- break;
- }
- if (c1 == "a" && c2 == "u" && c3 == "t" && c4 == "o"){
- console.WriteLine("Login korrekt");
- }
- else {
- console.WriteLine("Login Inkorrekt");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement