public static void Main()
    {
        var nameAndAddress = Console.ReadLine().Split();
        var name           = $"{nameAndAddress[0]} {nameAndAddress[1]}";
        var address        = nameAndAddress[2];
        var town           = nameAndAddress[3];
        var tuple1         = new Threeuple <string, string, string>(name, address, town);

        var nameAndBeer = Console.ReadLine().Split();
        var name2       = nameAndBeer[0];
        var beerLitres  = int.Parse(nameAndBeer[1]);
        var drinkOrNot  = nameAndBeer[2].Equals("drunk");
        var tuple2      = new Threeuple <string, int, bool>(name2, beerLitres, drinkOrNot);

        var bankDetails = Console.ReadLine().Split();
        var name3       = bankDetails[0];
        var bankBalance = double.Parse(bankDetails[1]);
        var bankName    = bankDetails[2];

        var tuple3 = new Threeuple <string, double, string>(name3, bankBalance, bankName);

        Console.WriteLine(tuple1.ToString());
        Console.WriteLine(tuple2.ToString());
        Console.WriteLine(tuple3.ToString());
    }
Exemple #2
0
    static void Main()
    {
        string[] inputTokens = Console.ReadLine().Split(' ');
        string   names       = $"{inputTokens[0]} {inputTokens[1]}";
        string   address     = inputTokens[2];
        string   town        = inputTokens[3];
        Threeuple <string, string, string> namesAdress = new Threeuple <string, string, string>(names, address, town);

        Console.WriteLine(namesAdress);

        inputTokens = Console.ReadLine().Split(' ');
        string name    = inputTokens[0];
        int    liters  = int.Parse(inputTokens[1]);
        bool   boolean = false;

        if (inputTokens[2] == "drunk")
        {
            boolean = true;
        }
        Threeuple <string, int, bool> nameLiters = new Threeuple <string, int, bool>(name, liters, boolean);

        Console.WriteLine(nameLiters);

        inputTokens = Console.ReadLine().Split(' ');
        string nameOf      = inputTokens[0];
        double doubleParam = double.Parse(inputTokens[1], CultureInfo.InvariantCulture);
        string bankName    = inputTokens[2];
        Threeuple <string, double, string> intDouble = new Threeuple <string, double, string>(nameOf, doubleParam, bankName);

        Console.WriteLine(intDouble);
    }
        public static void Main()
        {
            // <<first name> <last name>> <address> <town>
            var inputTokens = Console.ReadLine().Split(' ');
            var tuple1      = new Threeuple <string, string, string>(
                $"{inputTokens[0]} {inputTokens[1]}",
                inputTokens[2],
                inputTokens[3]);

            // <name> <liters of beer> <drunk or not>
            inputTokens = Console.ReadLine().Split(' ');
            var tuple2 = new Threeuple <string, int, bool>(
                inputTokens[0],
                int.Parse(inputTokens[1]),
                inputTokens[2] == "drunk" ? true : false);

            // <name> <account balance (double)> <bank name>
            inputTokens = Console.ReadLine().Split(' ');
            var tuple3 = new Threeuple <string, double, string>(
                inputTokens[0],
                double.Parse(inputTokens[1]),
                inputTokens[2]);

            Console.WriteLine(tuple1);
            Console.WriteLine(tuple2);
            Console.WriteLine(tuple3);
        }
Exemple #4
0
 static void Main(string[] args)
 {
     for (int i = 0; i < 3; i++)
     {
         string[] inputItemArg = Console.ReadLine().Split();
         if (i == 0)
         {
             StringBuilder builder = new StringBuilder();
             builder.Append(inputItemArg[0]);
             builder.Append(' ');
             builder.Append(inputItemArg[1]);
             StringBuilder itemOne   = builder;
             string        itemTwo   = inputItemArg[2];
             string        itemThree = inputItemArg[3];
             Threeuple <StringBuilder, string, string> threeuple = new Threeuple <StringBuilder, string, string>(itemOne, itemTwo, itemThree);
             Console.WriteLine(threeuple);
         }
         else if (i == 1)
         {
             string itemOne   = inputItemArg[0];
             int    itemTwo   = int.Parse(inputItemArg[1]);
             bool   itemThree = IsDrunk(inputItemArg[2]);
             Threeuple <string, int, bool> threeuple = new Threeuple <string, int, bool>(itemOne, itemTwo, itemThree);
             Console.WriteLine(threeuple);
         }
         else
         {
             string itemOne   = inputItemArg[0];
             double itemTwo   = double.Parse(inputItemArg[1]);
             string itemThree = inputItemArg[2];
             Threeuple <string, double, string> threeuple = new Threeuple <string, double, string>(itemOne, itemTwo, itemThree);
             Console.WriteLine(threeuple);
         }
     }
 }
    static void Main(string[] args)
    {
        string[] nameAdressTown = Console.ReadLine().Split();
        string   fullName       = nameAdressTown[0] + " " + nameAdressTown[1];
        string   adress         = nameAdressTown[2];
        string   town           = nameAdressTown[3];

        Threeuple <string, string, string> firstThreeuple = new Threeuple <string, string, string>(fullName, adress, town);

        string[] personBeerDrunk = Console.ReadLine().Split();
        string   person          = personBeerDrunk[0];
        int      beer            = int.Parse(personBeerDrunk[1]);
        bool     drunk;

        if (personBeerDrunk[2] == "drunk")
        {
            drunk = true;
        }
        else
        {
            drunk = false;
        }
        Threeuple <string, int, bool> secondThreeuple = new Threeuple <string, int, bool>(person, beer, drunk);

        string[] personCashBank = Console.ReadLine().Split();
        string   name           = personCashBank[0];
        double   cash           = double.Parse(personCashBank[1]);
        string   bank           = personCashBank[2];
        Threeuple <string, double, string> thirdThreeuple = new Threeuple <string, double, string>(name, cash, bank);

        Console.WriteLine(firstThreeuple);
        Console.WriteLine(secondThreeuple);
        Console.WriteLine(thirdThreeuple);
    }
    public static void Main()
    {
        var inParams        = Console.ReadLine().Split(' ');
        var names           = $"{inParams[0]} {inParams[1]}";
        var address         = inParams[2];
        var town            = inParams[3];
        var namesAdressTown = new Threeuple <string, string, string>(names, address, town);

        Console.WriteLine(namesAdressTown);

        inParams = Console.ReadLine().Split(' ');
        var name            = inParams[0];
        var liters          = int.Parse(inParams[1]);
        var drink           = inParams[2] == "drunk";
        var nameLitersDrink = new Threeuple <string, int, bool>(name, liters, drink);

        Console.WriteLine(nameLitersDrink);

        inParams = Console.ReadLine().Split(' ');
        name     = inParams[0];
        var amount         = double.Parse(inParams[1]);
        var bank           = inParams[2];
        var nameAmountBank = new Threeuple <string, double, string>(name, amount, bank);

        Console.WriteLine(nameAmountBank);
    }
Exemple #7
0
    public static void Main(string[] args)
    {
        var nameAdressTown = Console.ReadLine().Split().ToList();
        var fullName       = nameAdressTown[0] + " " + nameAdressTown[1];
        var adress         = nameAdressTown[2];
        var town           = nameAdressTown[3];

        var firstThreeuple = new Threeuple <string, string, string>(fullName, adress, town);

        var  personBeerDrunk = Console.ReadLine().Split().ToList();
        var  person          = personBeerDrunk[0];
        var  beer            = int.Parse(personBeerDrunk[1]);
        bool drunk;

        drunk = personBeerDrunk[2] == "drunk";
        var secondThreeuple = new Threeuple <string, int, bool>(person, beer, drunk);

        var personCashBank = Console.ReadLine().Split().ToList();
        var name           = personCashBank[0];
        var cash           = double.Parse(personCashBank[1]);
        var bank           = personCashBank[2];
        var thirdThreeuple = new Threeuple <string, double, string>(name, cash, bank);

        Console.WriteLine(firstThreeuple);
        Console.WriteLine(secondThreeuple);
        Console.WriteLine(thirdThreeuple);
    }
Exemple #8
0
    static void Main(string[] args)
    {
        string[] line1 = Console.ReadLine().Split();
        string[] line2 = Console.ReadLine().Split();
        string[] line3 = Console.ReadLine().Split();

        string fullName = line1[0] + " " + line1[1];
        string address  = line1[2];
        string town     = line1[3];
        var    person   = new Threeuple <string, string, string>(fullName, address, town);

        string name   = line2[0];
        int    liters = int.Parse(line2[1]);
        bool   drunk  = false;

        if (line2[2].ToLower() == "drunk")
        {
            drunk = true;
        }
        var drinker = new Threeuple <string, int, bool>(name, liters, drunk);

        string client  = line3[0];
        double amount  = double.Parse(line3[1]);
        string bank    = line3[2];
        var    numbers = new Threeuple <string, double, string>(client, amount, bank);

        Console.WriteLine(person);
        Console.WriteLine(drinker);
        Console.WriteLine(numbers);
    }
Exemple #9
0
    static void Main(string[] args)
    {
        var input1  = Console.ReadLine().Split();
        var names   = input1[0] + " " + input1[1];
        var address = input1[2];
        var town    = input1[3];

        Threeuple <string, string, string> tuple = new Threeuple <string, string, string>(names, address, town);

        var input2       = Console.ReadLine().Split();
        var name         = input2[0];
        var litersOfBeer = int.Parse(input2[1]);
        var drunkOrNot   = input2[2];
        var isDrunk      = "False";

        if (drunkOrNot == "drunk")
        {
            isDrunk = "True";
        }

        Threeuple <string, int, string> tuple2 = new Threeuple <string, int, string>(name, litersOfBeer, isDrunk);

        var input3    = Console.ReadLine().Split();
        var name2     = input3[0];
        var doubleNum = double.Parse(input3[1]);
        var bankName  = input3[2];

        Threeuple <string, double, string> tuple3 = new Threeuple <string, double, string>(name2, doubleNum, bankName);

        Console.WriteLine(tuple);
        Console.WriteLine(tuple2);
        Console.WriteLine(tuple3);
    }
    static void Main()
    {
        var firstLine = Console.ReadLine().Split();
        var fullName  = firstLine[0] + " " + firstLine[1];
        var address   = firstLine[2];
        var town      = firstLine[3];

        var firstThreeuple = new Threeuple <string, string, string>(fullName, address, town);

        Console.WriteLine(firstThreeuple);

        var secondLine   = Console.ReadLine().Split();
        var name         = secondLine[0];
        var litersOfBeer = int.Parse(secondLine[1]);
        var isDrunk      = false;

        if (secondLine[2] == "drunk")
        {
            isDrunk = true;
        }

        var secondThreeuple = new Threeuple <string, int, bool>(name, litersOfBeer, isDrunk);

        Console.WriteLine(secondThreeuple);

        var thirdLine   = Console.ReadLine().Split();
        var persoName   = thirdLine[0];
        var bankBalance = double.Parse(thirdLine[1]);
        var bankName    = thirdLine[2];

        var thirdThreeuple = new Threeuple <string, double, string>(persoName, bankBalance, bankName);

        Console.WriteLine(thirdThreeuple);
    }
Exemple #11
0
    static void Main()
    {
        string[] firstFormat  = Console.ReadLine().Split();
        string[] secondFormat = Console.ReadLine().Split();
        string[] thirdFormat  = Console.ReadLine().Split();

        string firstFormatName = firstFormat[0] + " " + firstFormat[1];
        string address         = firstFormat[2];
        string town            = firstFormat[3];

        string secondFormatName = secondFormat[0];
        int    litersBeer       = int.Parse(secondFormat[1]);
        bool   drunkOrNot       = false;

        if (secondFormat[2].ToLower() == "drunk")
        {
            drunkOrNot = true;
        }

        string thirdFormatName = thirdFormat[0];
        double balance         = double.Parse(thirdFormat[1]);
        string bankName        = thirdFormat[2];

        var firstThreeuple  = new Threeuple <string, string, string>(firstFormatName, address, town);
        var secondThreeuple = new Threeuple <string, int, bool>(secondFormatName, litersBeer, drunkOrNot);
        var thirdThreeuple  = new Threeuple <string, double, string>(thirdFormatName, balance, bankName);

        Console.WriteLine(firstThreeuple);
        Console.WriteLine(secondThreeuple);
        Console.WriteLine(thirdThreeuple);
    }
Exemple #12
0
    private static void Main(string[] args)
    {
        string[] inputArgs = Console.ReadLine().Split();

        string item1 = inputArgs[0] + " " + inputArgs[1];
        string item2 = inputArgs[2];
        string item3 = inputArgs[3];

        Threeuple <string, string, string> firstTruple =
            new Threeuple <string, string, string>(item1, item2, item3);

        inputArgs = Console.ReadLine().Split();
        string personName = inputArgs[0];
        int    beerAmount = int.Parse(inputArgs[1]);
        bool   drunkText  = inputArgs[2] == "drunk" ? true : false;

        Threeuple <string, int, bool> secondTruple =
            new Threeuple <string, int, bool>(personName, beerAmount, drunkText);

        inputArgs = Console.ReadLine().Split();
        string name     = inputArgs[0];
        double balance  = double.Parse(inputArgs[1]);
        string bankName = inputArgs[2];

        Threeuple <string, double, string> thirdTruple =
            new Threeuple <string, double, string>(name, balance, bankName);

        Console.WriteLine(firstTruple);
        Console.WriteLine(secondTruple);
        Console.WriteLine(thirdTruple);
    }
Exemple #13
0
    public static void Main()
    {
        var input      = Console.ReadLine().Split();
        var names      = $"{input[0]} {input[1]}";
        var address    = input[2];
        var city       = input[3];
        var firstThree = new Threeuple <string, string, string>(names, address, city);

        var secondInput  = Console.ReadLine().Split();
        var name         = secondInput[0];
        var litersOfBeer = int.Parse(secondInput[1]);
        var drunkOrNot   = secondInput[2];

        if (drunkOrNot == "drunk")
        {
            drunkOrNot = "True";
        }
        else
        {
            drunkOrNot = "False";
        }
        var secondThree = new Threeuple <string, int, string>(name, litersOfBeer, drunkOrNot);

        var thirdInput = Console.ReadLine().Split();
        var nameof     = thirdInput[0];
        var accBalance = double.Parse(thirdInput[1]);
        var bankName   = thirdInput[2];
        var thirdThree = new Threeuple <string, double, string>(nameof, accBalance, bankName);

        Console.WriteLine(firstThree);
        Console.WriteLine(secondThree);
        Console.WriteLine(thirdThree);
    }
    public static void Main()
    {
        Threeuple <string, string, string> personAddressTown = new Threeuple <string, string, string>();
        Threeuple <string, int, bool>      personBeerDrunk   = new Threeuple <string, int, bool>();
        Threeuple <string, double, string> personBalanceBank = new Threeuple <string, double, string>();

        string[] personAddressTownData = Console.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        string[] personBeerDrunkData   = Console.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        string[] personBalanceBankData = Console.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

        personAddressTown.First  = personAddressTownData[0] + " " + personAddressTownData[1];
        personAddressTown.Second = personAddressTownData[2];
        personAddressTown.Third  = personAddressTownData[3];

        personBeerDrunk.First  = personBeerDrunkData[0];
        personBeerDrunk.Second = int.Parse(personBeerDrunkData[1]);
        if (personBeerDrunkData[2].ToLower() == "drunk")
        {
            personBeerDrunk.Third = true;
        }
        else
        {
            personBeerDrunk.Third = false;
        }

        personBalanceBank.First  = personBalanceBankData[0];
        personBalanceBank.Second = double.Parse(personBalanceBankData[1]);
        personBalanceBank.Third  = personBalanceBankData[2];

        Console.WriteLine(personAddressTown);
        Console.WriteLine(personBeerDrunk);
        Console.WriteLine(personBalanceBank);
    }
    static void Main(string[] args)
    {
        string[] firstInput = Console.ReadLine().Split();

        string fullName = $"{firstInput[0]} {firstInput[1]}";
        string address  = firstInput[2];
        string town     = firstInput[3];
        Threeuple <string, string, string> firstTuple = new Threeuple <string, string, string>(fullName, address, town);

        string[] secondInput   = Console.ReadLine().Split();
        string   name          = secondInput[0];
        int      littersOfBeer = int.Parse(secondInput[1]);
        bool     drunk         = secondInput[2] == "drunk" ? true : false;
        Threeuple <string, int, bool> secondTuple = new  Threeuple <string, int, bool>(name, littersOfBeer, drunk);

        string[] thirdInput = Console.ReadLine().Split();
        string   personName = thirdInput[0];
        double   balance    = double.Parse(thirdInput[1]);
        string   bankName   = thirdInput[2];
        Threeuple <string, double, string> thirdTuple = new Threeuple <string, double, string>(personName, balance, bankName);

        Console.WriteLine(firstTuple.Value());
        Console.WriteLine(secondTuple.Value());
        Console.WriteLine(thirdTuple.Value());
    }
    static void Main(string[] args)
    {
        var input      = ReadFromConsole();
        var firstItem  = input[0] + " " + input[1];
        var secondItem = input[2];
        var town       = input[3];
        Threeuple <string, string, string> firstLine = new Threeuple <string, string, string>(firstItem, secondItem, town);

        input = ReadFromConsole();
        var  name       = input[0];
        var  beerLitres = int.Parse(input[1]);
        var  drunk      = input[2];
        bool isDrunk    = drunk == "drunk";
        Threeuple <string, int, bool> secondLine = new Threeuple <string, int, bool>(name, beerLitres, isDrunk);

        input = ReadFromConsole();
        var userName     = input[0];
        var doubleNumber = double.Parse(input[1]);
        var bankName     = input[2];
        Threeuple <string, double, string> thirdLine = new Threeuple <string, double, string>(userName, doubleNumber, bankName);

        Console.WriteLine(firstLine);
        Console.WriteLine(secondLine);
        Console.WriteLine(thirdLine);
    }
Exemple #17
0
    public static void Main()

    {
        var firstLine = Console.ReadLine().Split(' ');

        var secondLine = Console.ReadLine().Split(' ');

        var thirdLine = Console.ReadLine().Split(' ');



        var firstTuple = new Threeuple <string, string, string>(firstLine[0] + " " + firstLine[1], firstLine[2], firstLine[3]);

        var secondTuple =

            new Threeuple <string, int, bool>(secondLine[0], int.Parse(secondLine[1]), secondLine[2] == "drunk");

        var thirdTuple = new Threeuple <string, double, string>(thirdLine[0], double.Parse(thirdLine[1]), thirdLine[2]);



        Console.WriteLine(firstTuple);

        Console.WriteLine(secondTuple);

        Console.WriteLine(thirdTuple);
    }
    static void Main() // 100/100
    {
        var    input1     = Console.ReadLine().Split();
        string name       = input1[0] + " " + input1[1];
        string address    = input1[2];
        string town       = input1[3];
        var    threeuple1 = new Threeuple <string, string, string>(name, address, town);

        Console.WriteLine(threeuple1);

        string[] input2     = Console.ReadLine().Split();
        string   name2      = input2[0];
        int      liters     = int.Parse(input2[1]);
        bool     drinkOrNot = input2[2] == "drunk";
        var      threeuple2 = new Threeuple <string, int, bool>(name2, liters, drinkOrNot);

        Console.WriteLine(threeuple2);

        var input3     = Console.ReadLine().Split();
        var name3      = input3[0];
        var doubleNum  = double.Parse(input3[1]);
        var bankName   = input3[2];
        var threeuple3 = new Threeuple <string, double, string>(name3, doubleNum, bankName);

        Console.WriteLine(threeuple3);
    }
Exemple #19
0
    static void Main()
    {
        string[] personInfo = Console.ReadLine().Split(' ');

        string fullName = $"{personInfo[0]} {personInfo[1]}";
        string address  = personInfo[2];
        string town     = personInfo[3];

        var personalInfo = new Threeuple <string, string, string>(fullName, address, town);

        Console.WriteLine(personalInfo);

        string[] personAndBeerCount = Console.ReadLine().Split(' ');

        string beerDrinker = personAndBeerCount[0];
        int    beerCount   = int.Parse(personAndBeerCount[1]);
        bool   isDrunk     = personAndBeerCount[2] == "drunk";

        var beerInfo = new Threeuple <string, int, bool>(beerDrinker, beerCount, isDrunk);

        Console.WriteLine(beerInfo);

        string[] bankInput = Console.ReadLine().Split(' ');

        string bankDepositer = bankInput[0];
        double balance       = double.Parse(bankInput[1]);
        string bankName      = bankInput[2];

        var bankInfo = new Threeuple <string, double, string>(bankDepositer, balance, bankName);

        Console.WriteLine(bankInfo);
    }
    public static void Main(string[] args)
    {
        var line     = Console.ReadLine().Split();
        var fullName = line[0] + " " + line[1];
        var adress   = line[2];
        var town     = line[3];
        Threeuple <string, string, string> tuple = new Threeuple <string, string, string>(fullName, adress, town);

        line     = Console.ReadLine().Split();
        fullName = line[0];
        var litersBeer = int.Parse(line[1]);
        var condition  = line[2];

        if (condition.Contains("not"))
        {
            condition = "False";
        }
        else
        {
            condition = "True";
        }
        Threeuple <string, int, string> secondTuple = new Threeuple <string, int, string>(fullName, litersBeer, condition);

        line     = Console.ReadLine().Split();
        fullName = line[0];
        var accBalance = double.Parse(line[1]);
        var bankName   = line[2];
        Threeuple <string, double, string> thirdTuple = new Threeuple <string, double, string>(fullName, accBalance, bankName);

        Console.WriteLine(tuple);
        Console.WriteLine(secondTuple);
        Console.WriteLine(thirdTuple);
    }
Exemple #21
0
        public void CreateAThreeuple()
        {
            //Arrange
            _33_12.Threeuple <string, double, string> test = new Threeuple <string, double, string>
                                                                 ("Pesho", 8.36, "Purva investicionna banka");

            //Act & Assert
            Assert.IsTrue(test.ToString() == "Pesho -> 8.36 -> Purva investicionna banka");
        }
Exemple #22
0
    public static void Main()
    {
        string[] firstParts  = ParseInput();
        string[] secondParts = ParseInput();
        string[] thirdParts  = ParseInput();

        Threeuple <string, string, string> firstThreeuple  = new Threeuple <string, string, string>($"{firstParts[0]} {firstParts[1]}", firstParts[2], firstParts[3]);
        Threeuple <string, int, bool>      secondThreeuple = new Threeuple <string, int, bool>(secondParts[0], int.Parse(secondParts[1]), secondParts[2] == "drunk" ? true : false);
        Threeuple <string, double, string> thirdThreeuple  = new Threeuple <string, double, string>(thirdParts[0], double.Parse(thirdParts[1]), thirdParts[2]);

        Console.WriteLine(firstThreeuple);
        Console.WriteLine(secondThreeuple);
        Console.WriteLine(thirdThreeuple);
    }
    public static void Main()
    {
        string[] tuple1Args = Console.ReadLine().Split();
        Threeuple <string, string, string> tuple1 = new Threeuple <string, string, string>(tuple1Args[0] + " " + tuple1Args[1], tuple1Args[2], tuple1Args[3]);

        string[] tuple2Args = Console.ReadLine().Split();
        Threeuple <string, int, bool> tuple2 = new Threeuple <string, int, bool>(tuple2Args[0], int.Parse(tuple2Args[1]), tuple2Args[2] == "drunk" ? true: false);

        string[] tuple3Args = Console.ReadLine().Split();
        Threeuple <string, double, string> tuple3 = new Threeuple <string, double, string>(tuple3Args[0], double.Parse(tuple3Args[1]), tuple3Args[2]);

        Console.WriteLine(tuple1);
        Console.WriteLine(tuple2);
        Console.WriteLine(tuple3);
    }
Exemple #24
0
    static void Main(string[] args)
    {
        string[] firstLine = Console.ReadLine().Split();
        string   name      = $"{firstLine[0]} {firstLine[1]}";

        string[] secondLine = Console.ReadLine().Split();
        string[] thirdLine  = Console.ReadLine().Split();

        var tupleFullNameAddress  = new Threeuple <string, string, string>(name, firstLine[2], firstLine[3]);
        var tupleNameLitersOfBeer = new Threeuple <string, int, bool>(secondLine[0], int.Parse(secondLine[1]), secondLine[2] == "drunk" ? true : false);
        var tupleNumbers          = new Threeuple <string, double, string>(thirdLine[0], double.Parse(thirdLine[1]), thirdLine[2]);

        Console.WriteLine(tupleFullNameAddress);
        Console.WriteLine(tupleNameLitersOfBeer);
        Console.WriteLine(tupleNumbers);
    }
Exemple #25
0
    static void Main(string[] args)
    {
        string[] input =
            Console.ReadLine()
            .Split()
            .ToArray();

        string names  = input[0] + " " + input[1];
        string street = input[2];
        string town   = input[3];

        Threeuple <string, string, string> firstTuple
            = new Threeuple <string, string, string>(names, street, town);

        Console.WriteLine(firstTuple.ToString());

        input =
            Console.ReadLine()
            .Split()
            .ToArray();

        string name         = input[0];
        int    litersOfBeer = int.Parse(input[1]);


        bool IsDrunk = input[2] == "drunk";


        Threeuple <string, int, string> secondTuple
            = new Threeuple <string, int, string>(name, litersOfBeer, IsDrunk.ToString());

        Console.WriteLine(secondTuple.ToString());

        input =
            Console.ReadLine()
            .Split()
            .ToArray();

        string nextName   = input[0];
        double accBalance = double.Parse(input[1]);
        string bankName   = input[2];

        Threeuple <string, double, string> thirdTuple =
            new Threeuple <string, double, string>(nextName, accBalance, bankName);

        Console.WriteLine(thirdTuple.ToString());
    }
        static void Main(string[] args)
        {
            var line1  = Console.ReadLine().Split();
            var tuple1 = new Threeuple <string, string, string>(line1[0] + " " + line1[1], line1[2], line1[3]);

            Console.WriteLine(tuple1.Item1 + " -> " + tuple1.Item2 + " -> " + tuple1.Item3);

            var line2  = Console.ReadLine().Split();
            var tuple2 = new Threeuple <string, int, string>(line2[0], int.Parse(line2[1]), line2[2] == "drunk" ? "True": "False");

            Console.WriteLine(tuple2.Item1 + " -> " + tuple2.Item2 + " -> " + tuple2.Item3);

            var line3  = Console.ReadLine().Split();
            var tuple3 = new Threeuple <string, double, string>(line3[0], double.Parse(line3[1]), line3[2]);

            Console.WriteLine(tuple3.Item1 + " -> " + tuple3.Item2 + " -> " + tuple3.Item3);
        }
Exemple #27
0
    public static void Main()
    {
        string[] inputOne = Console.ReadLine().Split();
        Threeuple <string, string, string> tupleOne =
            new Threeuple <string, string, string>(inputOne[0] + " " + inputOne[1], inputOne[2], inputOne[3]);

        string[] inputTwo = Console.ReadLine().Split();
        Threeuple <string, int, bool> tupleTwo =
            new Threeuple <string, int, bool>(inputTwo[0], int.Parse(inputTwo[1]), CheckIfDrunk(inputTwo[2]));

        string[] inputThree = Console.ReadLine().Split();
        Threeuple <string, double, string> tupleThree =
            new Threeuple <string, double, string>(inputThree[0], double.Parse(inputThree[1]), inputThree[2]);

        Console.WriteLine(tupleOne.ToString());
        Console.WriteLine(tupleTwo.ToString());
        Console.WriteLine(tupleThree.ToString());
    }
Exemple #28
0
    static void Main(string[] args)
    {
        var input = Console.ReadLine().Split();
        Threeuple <string, string, string> tuple1 = new Threeuple <string, string, string>(input[0] + " " + input[1], input[2], input[3]);

        Console.WriteLine(tuple1);

        input = Console.ReadLine().Split();
        bool isDrunk = input[2] == "drunk" ? true : false;
        Threeuple <string, int, bool> tuple2 = new Threeuple <string, int, bool>(input[0], int.Parse(input[1]), isDrunk);

        Console.WriteLine(tuple2);

        input = Console.ReadLine().Split();
        Threeuple <string, double, string> tuple3 = new Threeuple <string, double, string>(input[0], double.Parse(input[1]), input[2]);

        Console.WriteLine(tuple3);
    }
Exemple #29
0
    public static void Main()
    {
        var nameAndAddress = Console.ReadLine().Split();
        var personInfo     = new Threeuple <string, string, string>($"{nameAndAddress[0]} {nameAndAddress[1]}",
                                                                    nameAndAddress[2], nameAndAddress[3]);

        var  nameAndAmountBeer = Console.ReadLine().Split();
        bool drinkOrNot        = nameAndAmountBeer[2] == "drunk" ? true : false;
        var  personsBeerAmoubt = new Threeuple <string, int, bool>(nameAndAmountBeer[0], int.Parse(nameAndAmountBeer[1]), drinkOrNot);

        var    bankAccount          = Console.ReadLine().Split();
        double balance              = Math.Round(double.Parse(bankAccount[1]), 1);
        var    differentTypeNumbers = new Threeuple <string, double, string>(bankAccount[0], balance, bankAccount[2]);

        Console.WriteLine(personInfo);
        Console.WriteLine(personsBeerAmoubt);
        Console.WriteLine(differentTypeNumbers);
    }
Exemple #30
0
    public static void Main()
    {
        string[] firstInput = Console.ReadLine().Split();

        Threeuple <string, string, string> firstTuple = new Threeuple <string, string, string>((firstInput[0] + " " + firstInput[1]), firstInput[2], firstInput[3]);

        Console.WriteLine(firstTuple.ToString());

        string[] secondInput = Console.ReadLine().Split();
        Threeuple <string, int, bool> secondTuple = new Threeuple <string, int, bool>(secondInput[0], int.Parse(secondInput[1]), ((secondInput[2] == "drunk") ? true : false));

        Console.WriteLine(secondTuple.ToString());

        string[] thirdInput = Console.ReadLine().Split();
        Threeuple <string, double, string> thirdTuple = new Threeuple <string, double, string>(thirdInput[0], double.Parse(thirdInput[1]), thirdInput[2]);

        Console.WriteLine(thirdTuple.ToString());
    }