Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
STAN
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string SvarText = "flicka"; string VisaText = "??????"; int gissningar = 10; while (gissningar>0) { Console.WriteLine("Gissa en bokstav:"); string GissaText = Console.ReadLine(); string hittatBokstav = "falskt"; for (int bokstavsPosition = 0; bokstavsPosition < 6;bokstavsPosition++) { if (Equals(GissaText,SvarText[bokstavsPosition])) { hittatBokstav = "sant"; string temp = VisaText.Remove(bokstavsPosition,1); VisaText = temp.Insert(bokstavsPosition,GissaText); } } if (hittatBokstav == "sant") { if (!VisaText.Contains( "?")) { Console.WriteLine("DU VANN!!!"); } } else { --gissningar; } if (gissningar == 0) { Console.WriteLine("GAME OVER!!!"); } } } } }
run
|
edit
|
history
|
help
0
nikk
AX 2012 Test #1
Overriding call parent & child class
Delegate Example
text
Ref
bbbbbb
Fórum ➡ Building a List<> with questions and answers, from data in TXT file, using LINQ ♦
Problem_binary
Coding Exercise