Last active
August 29, 2015 14:15
-
-
Save LevShab/c6dc75aaa2ad40dc11bf to your computer and use it in GitHub Desktop.
License2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace License2 | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
string answ; | |
int num = -1; | |
while (num < 0 ){ | |
Console.WriteLine("Согласны ли вы с условием лицензионного соглашения? (yes/no)"); | |
answ = Console.ReadLine(); | |
num = answ.IndexOf("yes"); | |
if (num >= 0){ | |
Console.WriteLine("Вы приняли лицензионное соглашение"); | |
num = answ.IndexOf("yes"); | |
}else{ | |
Console.WriteLine("Для вас вам предется вернутся к началу и внимательно прочесть соглашение"); | |
} | |
} | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment