Skip to content

Instantly share code, notes, and snippets.

@LevShab
Last active August 29, 2015 14:15
Show Gist options
  • Save LevShab/c6dc75aaa2ad40dc11bf to your computer and use it in GitHub Desktop.
Save LevShab/c6dc75aaa2ad40dc11bf to your computer and use it in GitHub Desktop.
License2
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