├── .gitignore ├── 1GitGitHubDebuggingSearching ├── GitGitHubDebuggingSearching.sln ├── HolidaysbetweenTwoDates │ ├── App.config │ ├── HolidaysbetweenTwoDates.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs └── Palindromes │ ├── App.config │ ├── Launcher.cs │ ├── Palindromes.csproj │ └── Properties │ └── AssemblyInfo.cs ├── 2DataTypesAndVariables ├── BooleanVariable │ ├── App.config │ ├── BooleanVariable.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CenturiestoMinutes │ ├── App.config │ ├── CenturiestoMinutes.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CenturiestoNanoseconds │ ├── App.config │ ├── CenturiestoNanoseconds.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CircleArea(Precision 12) │ ├── App.config │ ├── CircleArea(Precision 12).csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ComparingFloats │ ├── App.config │ ├── ComparingFloats.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ConvertSpeedUnits │ ├── App.config │ ├── ConvertSpeedUnits.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── DataTypesAndVariables.sln ├── DifferentIntegersSize │ ├── App.config │ ├── DifferentIntegersSize.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Elevator │ ├── App.config │ ├── Elevator.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── EmployeeData │ ├── App.config │ ├── EmployeeData.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ExactSumofRealNumbers │ ├── App.config │ ├── ExactSumofRealNumbers.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ExchangeVariableValues │ ├── App.config │ ├── ExchangeVariableValues.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── FastPrimeChecker │ ├── App.config │ ├── FastPrimeChecker.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Greeting │ ├── App.config │ ├── Greeting.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── InttoHexandBinary │ ├── App.config │ ├── InttoHexandBinary.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── PracticeCharsAndStrings │ ├── App.config │ ├── Launcher.cs │ ├── PracticeCharsAndStrings.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PracticeFloatingPoints │ ├── App.config │ ├── Launcher.cs │ ├── PracticeFloatingPoints.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PracticeIntegers │ ├── App.config │ ├── Launcher.cs │ ├── PracticeIntegers.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PrintPartOfASCIITable │ ├── App.config │ ├── Launcher.cs │ ├── PrintPartOfASCIITable.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── RectangleProperties │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RectangleProperties.csproj ├── RefactorSpecialNumbers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RefactorSpecialNumbers.csproj ├── RefactorVolumePyramid │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RefactorVolumePyramid.csproj ├── ReverseCharacters │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ReverseCharacters.csproj ├── SpecialNumbers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SpecialNumbers.csproj ├── StringsAndObjects │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── StringsAndObjects.csproj ├── TheaThePhotographer │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── TheaThePhotographer.csproj ├── TriplesofLetters │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── TriplesofLetters.csproj ├── VariableinHexFormat │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── VariableinHexFormat.csproj └── VowelorDigit │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── VowelorDigit.csproj ├── 3MethodsAndDebugging ├── BePositive │ ├── App.config │ ├── BePositive.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── BlankReceipt │ ├── App.config │ ├── BlankReceipt.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CalculateTriangleArea │ ├── App.config │ ├── CalculateTriangleArea.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CenterPoint │ ├── App.config │ ├── CenterPoint.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CubeProperties │ ├── App.config │ ├── CubeProperties.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── DrawFilledSquare │ ├── App.config │ ├── DrawFilledSquare.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── EnglishNameofLastDigit │ ├── App.config │ ├── EnglishNameofLastDigit.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Factorial │ ├── App.config │ ├── Factorial.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── FactorialTrailingZeroes │ ├── App.config │ ├── FactorialTrailingZeroes.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── FibonacciNumbers │ ├── App.config │ ├── FibonacciNumbers.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── GeometryCalculator │ ├── App.config │ ├── GeometryCalculator.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── GreaterofTwoValues │ ├── App.config │ ├── GreaterofTwoValues.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Hello, Name │ ├── App.config │ ├── HelloName.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── HolidaysBetweenTwoDates │ ├── App.config │ ├── HolidaysBetweenTwoDates.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── InstructionSet │ ├── App.config │ ├── InstructionSet.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── LongerLine │ ├── App.config │ ├── Launcher.cs │ ├── LongerLine.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MasterNumber │ ├── App.config │ ├── Launcher.cs │ ├── MasterNumber.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MathPower │ ├── App.config │ ├── Launcher.cs │ ├── MathPower.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MaxMethod │ ├── App.config │ ├── Launcher.cs │ ├── MaxMethod.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MethodsAndDebugging.sln ├── MultiplyEvensbyOdds │ ├── App.config │ ├── Launcher.cs │ ├── MultiplyEvensbyOdds.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── NumbersinReversedOrder │ ├── App.config │ ├── Launcher.cs │ ├── NumbersinReversedOrder.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PriceChangeAlert │ ├── App.config │ ├── Launcher.cs │ ├── PriceChangeAlert.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PrimeChecker │ ├── App.config │ ├── Launcher.cs │ ├── PrimeChecker.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PrimesinGivenRange │ ├── App.config │ ├── Launcher.cs │ ├── PrimesinGivenRange.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PrintingTriangle │ ├── App.config │ ├── Launcher.cs │ ├── PrintingTriangle.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── SequenceOfCommands │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SequenceOfCommands.csproj ├── SignofIntegerNumber │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SignofIntegerNumber.csproj └── Substring │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── Substring.csproj ├── 4ArraysAndLists ├── AppendLists │ ├── App.config │ ├── AppendLists.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ArrayManipulator │ ├── App.config │ ├── ArrayManipulator.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ArraysAndLists.sln ├── BombNumbers │ ├── App.config │ ├── BombNumbers.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CompareCharArrays │ ├── App.config │ ├── CompareCharArrays.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CondenseArraytoNumber │ ├── App.config │ ├── CondenseArraytoNumber.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CountNumbers │ ├── App.config │ ├── CountNumbers.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── DayofWeek │ ├── App.config │ ├── DayofWeek.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── EqualSums │ ├── App.config │ ├── EqualSums.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ExtractMiddleElements │ ├── App.config │ ├── ExtractMiddleElements.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── FoldandSum │ ├── App.config │ ├── FoldandSum.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Index of Letters │ ├── App.config │ ├── IndexofLetters.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── LargestCommonEnd │ ├── App.config │ ├── LargestCommonEnd.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── LastKNumbersSums │ ├── App.config │ ├── LastKNumbersSums.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ListsMaxSequenceofEqualElements │ ├── App.config │ ├── Launcher.cs │ ├── ListsMaxSequenceofEqualElements.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MaxSequenceofEqualElements │ ├── App.config │ ├── Launcher.cs │ ├── MaxSequenceofEqualElements.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MaxSequenceofIncreasingElements │ ├── App.config │ ├── Launcher.cs │ ├── MaxSequenceofIncreasingElements.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MostFrequentNumber │ ├── App.config │ ├── Launcher.cs │ ├── MostFrequentNumber.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PairsbyDifference │ ├── App.config │ ├── Launcher.cs │ ├── PairsbyDifference.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── RemoveNegativesandReverse │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RemoveNegativesandReverse.csproj ├── ReverseArrayofIntegers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ReverseArrayofIntegers.csproj ├── ReverseArrayofStrings │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ReverseArrayofStrings.csproj ├── RotateandSum │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RotateandSum.csproj ├── RoundingNumbers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RoundingNumbers.csproj ├── SieveofEratosthenes │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SieveofEratosthenes.csproj ├── SortNumbers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SortNumbers.csproj ├── SplitbyWordCasing │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SplitbyWordCasing.csproj ├── SquareNumbers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SquareNumbers.csproj ├── SumAdjacentEqualNumbers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SumAdjacentEqualNumbers.csproj ├── SumArrays │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SumArrays.csproj ├── SumReversedNumbers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SumReversedNumbers.csproj ├── Template │ ├── App.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Template.csproj ├── TemplatePublic │ ├── App.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Square Numbers.cs │ └── Square Numbers.csproj └── TrippleSum │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── TrippleSum.csproj ├── 5DictionariesAndLINQ ├── 5DictionariesAndLINQ.sln ├── AMinerTask │ ├── AMinerTask.csproj │ ├── App.config │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CountRealNumbers │ ├── App.config │ ├── CountRealNumbers.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── DragonArmy │ ├── App.config │ ├── DragonArmy.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── FixEmails │ ├── App.config │ ├── FixEmails.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── FoldandSum │ ├── App.config │ ├── FoldandSum.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── HandsOfCards │ ├── App.config │ ├── HandsOfCards.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Largest3Numbers │ ├── App.config │ ├── Largest3Numbers.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── LegendaryFarming │ ├── App.config │ ├── Launcher.cs │ ├── LegendaryFarming.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── LogsAggregator │ ├── App.config │ ├── Launcher.cs │ ├── LogsAggregator.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MinMaxSumAverage │ ├── App.config │ ├── Launcher.cs │ ├── MinMaxSumAverage.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── OddOccurrences │ ├── App.config │ ├── Launcher.cs │ ├── OddOccurrences.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── Phonebook │ ├── App.config │ ├── Launcher.cs │ ├── Phonebook.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PhonebookUpgrade │ ├── App.config │ ├── Launcher.cs │ ├── PhonebookUpgrade.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── PopulationCounter │ ├── App.config │ ├── Launcher.cs │ ├── PopulationCounter.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── SerbianMusicUnleashed │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SerbianMusicUnleashed.csproj ├── ShortWordsSorted │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ShortWordsSorted.csproj └── UserLogs │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── UserLogs.csproj ├── 6Objects-and-Classes ├── 6Objects-and-Classes.sln ├── AdvertisementMessage │ ├── AdvertisementMessage.csproj │ ├── App.config │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── AndreyAndBilliard │ ├── AndreyAndBilliard.csproj │ ├── App.config │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── AverageGrades │ ├── App.config │ ├── AverageGrades.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── BigFactorial │ ├── App.config │ ├── BigFactorial.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── BookLibrary │ ├── App.config │ ├── BookLibrary.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── BookLibraryModification │ ├── App.config │ ├── BookLibraryModification.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CirclesIntersection │ ├── App.config │ ├── CirclesIntersection.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ClosestTwoPoints │ ├── App.config │ ├── ClosestTwoPoints.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CountWorkDays │ ├── App.config │ ├── CountWorkDays.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── DayOfWeek │ ├── App.config │ ├── DayOfWeek.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── DistanceBetweenPoints │ ├── App.config │ ├── DistanceBetweenPoints.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── MentorGroup │ ├── App.config │ ├── Launcher.cs │ ├── MentorGroup.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── RandomizeWords │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RandomizeWords.csproj ├── RectanglePosition │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RectanglePosition.csproj ├── SalesReport │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SalesReport.csproj ├── StudentGroups │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── StudentGroups.csproj └── TeamworkProjects │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── TeamworkProjects.csproj ├── 7FilesAndDirectories ├── 7FilesAndDirectories.sln ├── FolderSize │ ├── App.config │ ├── FolderSize.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── LineNumbers │ ├── App.config │ ├── Launcher.cs │ ├── LineNumbers.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MergeFiles │ ├── App.config │ ├── Launcher.cs │ ├── MergeFiles.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── OddLines │ ├── App.config │ ├── Launcher.cs │ ├── OddLines.csproj │ └── Properties │ │ └── AssemblyInfo.cs └── WordCount │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── WordCount.csproj ├── 8Strings-and-Regex ├── 8Strings-and-Regex.sln ├── CharacterMultiplier │ ├── App.config │ ├── CharacterMultiplier.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ConvertBase-NtoBase-10 │ ├── App.config │ ├── ConvertBaseNtoBase10.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ConvertBase10toBaseN │ ├── App.config │ ├── ConvertBase10toBaseN.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CountSubstringOccurrences │ ├── App.config │ ├── CountSubstringOccurrences.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ExtractEmails │ ├── App.config │ ├── ExtractEmails.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ExtractSsentencesByKeyword │ ├── App.config │ ├── ExtractSentencesByKeyword.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── LettersChangeNumbers │ ├── App.config │ ├── Launcher.cs │ ├── LettersChangeNumbers.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MagicExchangeableWords │ ├── App.config │ ├── Launcher.cs │ ├── MagicExchangeableWords.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MelrahShake │ ├── App.config │ ├── Launcher.cs │ ├── MelrahShake.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── MultiplyBigNumber │ ├── App.config │ ├── Launcher.cs │ ├── MultiplyBigNumber.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── Palindromes │ ├── App.config │ ├── Launcher.cs │ ├── Palindromes.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── QueryMess │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── QueryMess.csproj ├── ReplaceATag │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ReplaceATag.csproj ├── ReverseString │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ReverseString.csproj ├── SumBigNumbers │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SumBigNumbers.csproj ├── TextFilter │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── TextFilter.csproj ├── UnicodeCharacters │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── UnicodeCharacters.csproj ├── UseYourChainsBuddy │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── UseYourChainsBuddy.csproj └── ValidUsernames │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── ValidUsernames.csproj ├── Exams ├── Exam-06th-Jan-2017 │ ├── EnduranceRally │ │ ├── App.config │ │ ├── EnduranceRally.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Exam-06th-Jan-2017.sln │ ├── SinoTheWalker │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SinoTheWalker.csproj │ ├── SoftUniKaraoke │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SoftUniKaraoke.csproj │ └── WinningTicket │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── WinningTicket.csproj ├── Exam-11th-September-2016 │ ├── Exam-11th-September-2016.sln │ ├── Files │ │ ├── App.config │ │ ├── Files.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Portal │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Portal.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── TheaThePhotographer │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── TheaThePhotographer.csproj │ └── TrophonTheGrumpyCat │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── TrophonTheGrumpyCat.csproj ├── Exam-12th-June-2016 │ ├── Exam-12th-June-2016.sln │ ├── FootballLeague │ │ ├── App.config │ │ ├── FootballLeague.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Numbers │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Numbers.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── SoftuniCoffeeOrders │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SoftuniCoffeeOrders.csproj │ └── TrifonsQuest │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── TrifonsQuest.csproj ├── Exam-23rd-October-2016 │ ├── CharityMarathon │ │ ├── App.config │ │ ├── CharityMarathon.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Exam-23rd-October-2016.sln │ ├── Ladybugs │ │ ├── App.config │ │ ├── Ladybugs.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── NetherRealms │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── NetherRealms.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ └── RoliTheCoder │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── RoliTheCoder.csproj ├── Exam-26th-February-2017 │ ├── Exam-26th-February-2017.sln │ ├── HornetArmada │ │ ├── App.config │ │ ├── HornetArmada.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── HornetAssault │ │ ├── App.config │ │ ├── HornetAssault.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── HornetComm │ │ ├── App.config │ │ ├── HornetComm.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ └── HornetWings │ │ ├── App.config │ │ ├── HornetWings.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ └── AssemblyInfo.cs ├── Exam-Preparation-I-Feb-2017 │ ├── EnduranceRally │ │ ├── App.config │ │ ├── EnduranceRally.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Exam-Preparation-I-Feb-2017.sln │ ├── SinoTheWalker │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SinoTheWalker.csproj │ ├── SoftUniKaraoke │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SoftUniKaraoke.csproj │ └── WinningTicket │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── WinningTicket.csproj ├── Sample-Exam-I-June-2016 │ ├── ArrayModifier │ │ ├── App.config │ │ ├── ArrayModifier.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── PopulationAggregation │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── PopulationAggregation.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Sample-Exam-I-June-2016.sln │ ├── SweetDessert │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SweetDessert.csproj │ └── TargetMultiplier │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── TargetMultiplier.csproj ├── Sample-Exam-I-October-2016 │ ├── CommandInterpreter │ │ ├── App.config │ │ ├── CommandInterpreter.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Files │ │ ├── App.config │ │ ├── Files.csproj │ │ ├── Launcher.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── RageQuit │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── RageQuit.csproj │ ├── Sample-Exam-I-October-2016.sln │ └── SoftuniCoffeeOrders │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── SoftuniCoffeeOrders.csproj ├── Sample-Exam-II-June-2016 │ ├── MatrixOperator │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── MatrixOperator.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Sample-Exam-II-June-2016.sln │ ├── SoftUniAirline │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── SoftUniAirline.csproj │ │ └── img │ │ │ └── softuniLogo.PNG │ ├── SoftUniCoffeeSupplies │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── SoftUniCoffeeSupplies.csproj │ └── SoftUniWaterSupplies │ │ ├── App.config │ │ ├── Launcher.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── SoftUniWaterSupplies.csproj └── Sample-Exam-II-October-2016 │ ├── ArrayManipulator │ ├── App.config │ ├── ArrayManipulator.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs │ ├── CubicMessages │ ├── App.config │ ├── CubicMessages.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs │ ├── FootballLeague │ ├── App.config │ ├── FootballLeague.csproj │ ├── Launcher.cs │ └── Properties │ │ └── AssemblyInfo.cs │ ├── Sample-Exam-II-October-2016.sln │ └── SweetDessert │ ├── App.config │ ├── Launcher.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── SweetDessert.csproj └── README.md /1GitGitHubDebuggingSearching/HolidaysbetweenTwoDates/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /1GitGitHubDebuggingSearching/HolidaysbetweenTwoDates/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | 4 | namespace HolidaysbetweenTwoDates 5 | { 6 | public class Launcher 7 | { 8 | public static void Main(string[] args) 9 | { 10 | var startDate = DateTime.ParseExact(Console.ReadLine(), "d.M.yyyy", CultureInfo.InvariantCulture); 11 | var endDate = DateTime.ParseExact(Console.ReadLine(), "d.M.yyyy", CultureInfo.InvariantCulture); 12 | var holidaysCount = 0; 13 | 14 | for (DateTime date = startDate; date <= endDate; date = date.AddDays(1)) 15 | { 16 | if (date.DayOfWeek == DayOfWeek.Saturday || date.DayOfWeek == DayOfWeek.Sunday) 17 | { 18 | holidaysCount++; 19 | } 20 | } 21 | 22 | Console.WriteLine(holidaysCount); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /1GitGitHubDebuggingSearching/Palindromes/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/BooleanVariable/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/BooleanVariable/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BooleanVariable 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | string input = Console.ReadLine(); 10 | bool isTrue = Convert.ToBoolean(input); 11 | 12 | if (isTrue) 13 | { 14 | Console.WriteLine("Yes"); 15 | } 16 | else 17 | { 18 | Console.WriteLine("No"); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/CenturiestoMinutes/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/CenturiestoMinutes/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CenturiestoMinutes 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | int centuries = int.Parse(Console.ReadLine()); 10 | int years = centuries * 100; 11 | double days = Math.Truncate(years * 365.2422); 12 | double hours = days * 24; 13 | double minutes = hours * 60; 14 | 15 | Console.WriteLine("{0} centuries = {1} years = {2} days = {3} hours = {4} minutes", centuries, years, days, hours, minutes); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/CenturiestoNanoseconds/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/CenturiestoNanoseconds/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | 4 | namespace CenturiestoNanoseconds 5 | { 6 | public class Launcher 7 | { 8 | public static void Main(string[] args) 9 | { 10 | byte centuries = byte.Parse(Console.ReadLine()); 11 | ushort years = (ushort)(centuries * 100); 12 | uint days = (uint)(years * 365.242); 13 | uint hours = days * 24; 14 | ulong minutes = hours * 60; 15 | ulong seconds = minutes * 60; 16 | ulong miliseconds = seconds * 1000; 17 | ulong microseconds = miliseconds * 1000; 18 | BigInteger nanoseconds = BigInteger.Multiply(microseconds, 1000); 19 | 20 | Console.WriteLine("{0:f0} centuries = {1:f0} years = {2:f0} days = {3:f0} hours = {4:f0} minutes = {5:f0} seconds = {6:f0} milliseconds = {7:f0} microseconds = {8:f0} nanoseconds", 21 | centuries, years, days, hours, minutes, seconds, miliseconds, microseconds, nanoseconds); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/CircleArea(Precision 12)/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/CircleArea(Precision 12)/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CircleArea_Precision_12_ 4 | { 5 | public class Program 6 | { 7 | public static void Main(string[] args) 8 | { 9 | double radius = double.Parse(Console.ReadLine()); 10 | double area = Math.PI * Math.Pow(radius, 2); 11 | Console.WriteLine("{0:F12}", area); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ComparingFloats/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ComparingFloats/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComparingFloats 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | double a = double.Parse(Console.ReadLine()); 10 | double b = double.Parse(Console.ReadLine()); 11 | double eps = 0.000001; 12 | 13 | if (Math.Abs(a - b) < eps) 14 | { 15 | Console.WriteLine("True"); 16 | } 17 | else 18 | { 19 | Console.WriteLine("False"); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ConvertSpeedUnits/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ConvertSpeedUnits/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ConvertSpeedUnits 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int distanceMeters = int.Parse(Console.ReadLine()); 10 | int hours = int.Parse(Console.ReadLine()); 11 | int minutes = int.Parse(Console.ReadLine()); 12 | int seconds = int.Parse(Console.ReadLine()); 13 | 14 | int timeSeconds = (hours * 3600) + (minutes * 60) + seconds; 15 | float speedMetersSec = (float)distanceMeters / timeSeconds; 16 | float speedKmHour = ((float)distanceMeters / 1000) / ((float)timeSeconds / 3600); 17 | float speedMiHour = ((float)distanceMeters / 1609) / ((float)timeSeconds / 3600); 18 | 19 | Console.WriteLine("{0}\n{1}\n{2}", speedMetersSec, speedKmHour, speedMiHour); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/DifferentIntegersSize/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/Elevator/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/Elevator/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Elevator 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | int people = int.Parse(Console.ReadLine()); 10 | int capacity = int.Parse(Console.ReadLine()); 11 | 12 | double courses = Math.Ceiling(people / (double)capacity); 13 | Console.WriteLine(courses); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/EmployeeData/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/EmployeeData/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EmployeeData 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | string firstName = "Amanda"; 10 | Console.WriteLine("First name: {0}", firstName); 11 | 12 | string lastName = "Jonson"; 13 | Console.WriteLine("Last name: {0}", lastName); 14 | 15 | sbyte age = 27; 16 | Console.WriteLine("Age: {0}", age); 17 | 18 | char gender = 'f'; 19 | Console.WriteLine("Gender: {0}", gender); 20 | 21 | long personalID = 8306112507; 22 | Console.WriteLine("Personal ID: {0}", personalID); 23 | 24 | uint employeeNum = 27563571; 25 | Console.WriteLine("Unique Employee number: {0}", employeeNum); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ExactSumofRealNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ExactSumofRealNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ExactSumofRealNumbers 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | int n = int.Parse(Console.ReadLine()); 10 | decimal sum = 0; 11 | for (int i = 0; i < n; i++) 12 | { 13 | decimal num = decimal.Parse(Console.ReadLine()); 14 | sum += num; 15 | } 16 | 17 | Console.WriteLine(sum); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ExchangeVariableValues/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ExchangeVariableValues/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ExchangeVariableValues 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | int aBefore = 5; 10 | int bBefore = 10; 11 | int temp = aBefore; 12 | int aAfter = bBefore; 13 | int bAfter = temp; 14 | 15 | Console.WriteLine("Before:\na = {0}\nb = {1}\nAfter:\na = {2}\nb = {3}", aBefore, bBefore, aAfter, bAfter); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/FastPrimeChecker/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/FastPrimeChecker/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FastPrimeChecker 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int number = int.Parse(Console.ReadLine()); 10 | 11 | for (int checkedNum = 2; checkedNum <= number; checkedNum++) 12 | { 13 | bool isPrime = true; 14 | 15 | for (int divisor = 2; divisor <= Math.Sqrt(checkedNum); divisor++) 16 | { 17 | if (checkedNum % divisor == 0) 18 | { 19 | isPrime = false; 20 | } 21 | } 22 | 23 | Console.WriteLine($"{checkedNum} -> {isPrime}"); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/Greeting/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/Greeting/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Greeting 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | string firstName = Console.ReadLine(); 10 | string lastName = Console.ReadLine(); 11 | byte age = byte.Parse(Console.ReadLine()); 12 | 13 | Console.WriteLine($"Hello, {firstName} {lastName}. You are {age} years old."); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/InttoHexandBinary/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/InttoHexandBinary/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace InttoHexandBinary 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int number = int.Parse(Console.ReadLine()); 10 | 11 | Console.WriteLine(Convert.ToString(number, 16).ToUpper()); 12 | Console.WriteLine(Convert.ToString(number, 2).ToUpper()); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/PracticeCharsAndStrings/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/PracticeCharsAndStrings/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PracticeCharsAndStrings 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | string text1 = "Software University"; 10 | char c1 = 'B'; 11 | char c2 = 'y'; 12 | char c3 = 'e'; 13 | string text2 = "I love programming"; 14 | Console.WriteLine(text1); 15 | Console.WriteLine(c1); 16 | Console.WriteLine(c2); 17 | Console.WriteLine(c3); 18 | Console.WriteLine(text2); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/PracticeFloatingPoints/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/PracticeFloatingPoints/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PracticeFloatingPoints 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | decimal num1 = 3.141592653589793238M; 10 | double num2 = 1.60217657; 11 | decimal num3 = 7.8184261974584555216535342341M; 12 | 13 | Console.WriteLine(num1); 14 | Console.WriteLine(num2); 15 | Console.WriteLine(num3); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/PracticeIntegers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/PracticeIntegers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PracticeIntegers 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | sbyte num1 = -100; 10 | byte num2 = 128; 11 | short num3 = -3540; 12 | ushort num4 = 64876; 13 | uint num5 = 2147483648; 14 | int num6 = -1141583228; 15 | long num7 = -1223372036854775808; 16 | Console.WriteLine(num1); 17 | Console.WriteLine(num2); 18 | Console.WriteLine(num3); 19 | Console.WriteLine(num4); 20 | Console.WriteLine(num5); 21 | Console.WriteLine(num6); 22 | Console.WriteLine(num7); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/PrintPartOfASCIITable/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/PrintPartOfASCIITable/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PrintPartOfASCIITable 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int startNum = int.Parse(Console.ReadLine()); 10 | int endNum = int.Parse(Console.ReadLine()); 11 | 12 | for (int decNum = startNum; decNum <= endNum; decNum++) 13 | { 14 | Console.Write("{0} ", Convert.ToChar(decNum)); 15 | } 16 | 17 | Console.WriteLine(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/RectangleProperties/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/RectangleProperties/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RectangleProperties 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | double a = double.Parse(Console.ReadLine()); 10 | double b = double.Parse(Console.ReadLine()); 11 | 12 | double perimeter = (2 * a) + (2 * b); 13 | double area = a * b; 14 | double diagonal = Math.Sqrt((a * a) + (b * b)); 15 | 16 | Console.WriteLine(perimeter); 17 | Console.WriteLine(area); 18 | Console.WriteLine(diagonal); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/RefactorSpecialNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/RefactorSpecialNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RefactorSpecialNumbers 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | int counter = int.Parse(Console.ReadLine()); 10 | int sum = 0; 11 | int currentNum = 0; 12 | bool isSpecial = false; 13 | 14 | for (int num = 1; num <= counter; num++) 15 | { 16 | currentNum = num; 17 | while (num > 0) 18 | { 19 | sum += num % 10; 20 | num = num / 10; 21 | } 22 | 23 | isSpecial = (sum == 5) || (sum == 7) || (sum == 11); 24 | Console.WriteLine($"{currentNum} -> {isSpecial}"); 25 | sum = 0; 26 | num = currentNum; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/RefactorVolumePyramid/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/RefactorVolumePyramid/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RefactorVolumePyramid 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | Console.Write("Length: "); 10 | double length = double.Parse(Console.ReadLine()); 11 | 12 | Console.Write("Width: "); 13 | double width = double.Parse(Console.ReadLine()); 14 | 15 | Console.Write("Height: "); 16 | double height = double.Parse(Console.ReadLine()); 17 | 18 | double volume = (length * width * height) / 3.0; 19 | 20 | Console.WriteLine("Pyramid Volume: {0:F2}", volume); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ReverseCharacters/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/ReverseCharacters/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ReverseCharacters 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | char letter1 = char.Parse(Console.ReadLine()); 10 | char letter2 = char.Parse(Console.ReadLine()); 11 | char letter3 = char.Parse(Console.ReadLine()); 12 | 13 | char temp = letter3; 14 | letter3 = letter1; 15 | letter1 = temp; 16 | 17 | Console.WriteLine("{0}{1}{2}", letter1, letter2, letter3); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/SpecialNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/SpecialNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SpecialNumbers 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | int count = int.Parse(Console.ReadLine()); 10 | 11 | for (int currentNum = 1; currentNum <= count; currentNum++) 12 | { 13 | int number = currentNum; // creating separate variable in order not to break the loop 14 | int digit = 0; 15 | int sumDigits = 0; 16 | 17 | while (number > 0) 18 | { 19 | digit = number % 10; // getting the last digit of the number 20 | sumDigits += digit; 21 | number /= 10; // removing the already used last digit 22 | } 23 | 24 | if (sumDigits == 5 || sumDigits == 7 || sumDigits == 11) 25 | { 26 | Console.WriteLine("{0} -> True", currentNum); 27 | } 28 | else 29 | { 30 | Console.WriteLine("{0} -> False", currentNum); 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/StringsAndObjects/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/StringsAndObjects/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace StringsAndObjects 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | string firstVar = "Hello"; 10 | string secondVar = "World"; 11 | object concatenated = firstVar + ' ' + secondVar; 12 | string thirdVar = (string)concatenated; 13 | Console.WriteLine(thirdVar); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/TheaThePhotographer/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/TheaThePhotographer/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TheaThePhotographer 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int totalPics = int.Parse(Console.ReadLine()); 10 | int filterTimePerPic = int.Parse(Console.ReadLine()); 11 | int usefulPicsPercent = int.Parse(Console.ReadLine()); 12 | int uploadTimePerPic = int.Parse(Console.ReadLine()); 13 | 14 | long usefulPics = (long)Math.Ceiling(totalPics * (usefulPicsPercent / 100.0)); 15 | long totalFilterTime = (long)totalPics * filterTimePerPic; 16 | long uploadUsefulTime = usefulPics * uploadTimePerPic; 17 | long totalTime = uploadUsefulTime + totalFilterTime; 18 | 19 | TimeSpan processTime = TimeSpan.FromSeconds(totalTime); 20 | Console.WriteLine("{0:D1}:{1:D2}:{2:D2}:{3:D2}", processTime.Days, processTime.Hours, processTime.Minutes, processTime.Seconds); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/TriplesofLetters/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/TriplesofLetters/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TriplesofLetters 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | int n = int.Parse(Console.ReadLine()); 10 | 11 | for (int c1 = 0; c1 < n; c1++) 12 | { 13 | for (int c2 = 0; c2 < n; c2++) 14 | { 15 | for (int c3 = 0; c3 < n; c3++) 16 | { 17 | char letter3 = (char)('a' + c3); 18 | char letter2 = (char)('a' + c2); 19 | char letter1 = (char)('a' + c1); 20 | Console.WriteLine("{0}{1}{2}", letter1, letter2, letter3); 21 | } 22 | } 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/VariableinHexFormat/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/VariableinHexFormat/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace VariableinHexFormat 4 | { 5 | public class Launcher 6 | { 7 | public static void Main(string[] args) 8 | { 9 | string inputNum = Console.ReadLine(); 10 | int num = Convert.ToInt32(inputNum, 16); 11 | Console.WriteLine(num); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/VowelorDigit/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /2DataTypesAndVariables/VowelorDigit/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace VowelorDigit 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | char input = char.Parse(Console.ReadLine()); 10 | 11 | // creating switch to check all the possible variants: 12 | switch (input) 13 | { 14 | case 'a': 15 | case 'o': 16 | case 'u': 17 | case 'e': 18 | case 'i': 19 | Console.WriteLine("vowel"); 20 | break; 21 | 22 | default: 23 | 24 | if (char.IsDigit(input)) 25 | { 26 | Console.WriteLine("digit"); 27 | } 28 | else 29 | { 30 | Console.WriteLine("other"); 31 | } 32 | 33 | break; 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/BePositive/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/BePositive/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("BePositive")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("BePositive")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("cb3a6afc-6b6e-483f-a4f1-0cb211fe9e75")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/BlankReceipt/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/BlankReceipt/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlankReceipt 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | PrintHeader(); 10 | PrintBody(); 11 | PrintFooter(); 12 | } 13 | 14 | public static void PrintHeader() 15 | { 16 | Console.WriteLine("CASH RECEIPT\n------------------------------"); 17 | } 18 | 19 | public static void PrintBody() 20 | { 21 | Console.WriteLine("Charged to____________________\nReceived by___________________"); 22 | } 23 | 24 | public static void PrintFooter() 25 | { 26 | Console.WriteLine("------------------------------\n\u00A9 SoftUni"); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/CalculateTriangleArea/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/CalculateTriangleArea/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CalculateTriangleArea 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | double height = double.Parse(Console.ReadLine()); 10 | double b = double.Parse(Console.ReadLine()); 11 | 12 | double triangleArea = CalcTriangleArea(height, b); 13 | Console.WriteLine(triangleArea); 14 | } 15 | 16 | public static double CalcTriangleArea(double height, double b) 17 | { 18 | double area = (height * b) / 2; 19 | return area; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/CenterPoint/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/CenterPoint/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CenterPoint 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | double x1 = double.Parse(Console.ReadLine()); 10 | double y1 = double.Parse(Console.ReadLine()); 11 | double x2 = double.Parse(Console.ReadLine()); 12 | double y2 = double.Parse(Console.ReadLine()); 13 | 14 | PrintPointClosestToCenter(x1, y1, x2, y2); 15 | Console.WriteLine(); 16 | } 17 | 18 | private static void PrintPointClosestToCenter(double x1, double y1, double x2, double y2) 19 | { 20 | double distancePoint1 = Math.Sqrt(Math.Pow(x1 - 0, 2) + Math.Pow(y1 - 0, 2)); 21 | double distancePoint2 = Math.Sqrt(Math.Pow(x2 - 0, 2) + Math.Pow(y2 - 0, 2)); 22 | 23 | if (distancePoint1 < distancePoint2) 24 | { 25 | Console.Write("({0}, {1})", x1, y1); 26 | } 27 | else 28 | { 29 | Console.Write("({0}, {1})", x2, y2); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/CubeProperties/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/CubeProperties/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CubeProperties 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | double side = double.Parse(Console.ReadLine()); 10 | string parameter = Console.ReadLine(); 11 | PrintCubeProperty(side, parameter); 12 | } 13 | 14 | public static void PrintCubeProperty(double cubeSide, string property) 15 | { 16 | double result = 0; 17 | 18 | switch (property) 19 | { 20 | case "face": 21 | result = Math.Sqrt(2 * Math.Pow(cubeSide, 2)); 22 | break; 23 | case "space": 24 | result = Math.Sqrt(3 * Math.Pow(cubeSide, 2)); 25 | break; 26 | case "volume": 27 | result = Math.Pow(cubeSide, 3); 28 | break; 29 | case "area": 30 | result = 6 * Math.Pow(cubeSide, 2); 31 | break; 32 | default: 33 | break; 34 | } 35 | 36 | Console.WriteLine("{0:F2}", result); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/DrawFilledSquare/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/DrawFilledSquare/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DrawFilledSquare 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int n = int.Parse(Console.ReadLine()); 10 | 11 | PrintFirstLastRow(n); 12 | PrintMiddleRows(n); 13 | PrintFirstLastRow(n); 14 | } 15 | 16 | public static void PrintFirstLastRow(int squareSide) 17 | { 18 | Console.WriteLine(new string('-', 2 * squareSide)); 19 | } 20 | 21 | public static void PrintMiddleRows(int squareSide) 22 | { 23 | for (int row = 1; row <= squareSide - 2; row++) 24 | { 25 | Console.Write('-'); 26 | 27 | for (int col = 1; col <= squareSide - 1; col++) 28 | { 29 | Console.Write("\\/"); 30 | } 31 | 32 | Console.WriteLine('-'); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/EnglishNameofLastDigit/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/Factorial/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/Factorial/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | 4 | namespace Factorial 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | int n = int.Parse(Console.ReadLine()); 11 | BigInteger factorialN = GetFactorial(n); 12 | 13 | Console.WriteLine(factorialN); 14 | } 15 | 16 | public static BigInteger GetFactorial(int n) 17 | { 18 | BigInteger factorial = 1; 19 | 20 | for (int currenNum = 1; currenNum <= n; currenNum++) 21 | { 22 | factorial = factorial * currenNum; 23 | } 24 | 25 | return factorial; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/Factorial/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Factorial")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("Factorial")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("df1e6c91-ff78-4f15-ba64-dfdd36509111")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/FactorialTrailingZeroes/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/FactorialTrailingZeroes/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | 4 | namespace FactorialTrailingZeroes 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | int number = int.Parse(Console.ReadLine()); 11 | BigInteger factorial = GetFactorial(number); 12 | int trailingZeors = CountTrailingZeros(factorial); 13 | Console.WriteLine(trailingZeors); 14 | } 15 | 16 | public static BigInteger GetFactorial(int n) 17 | { 18 | BigInteger factorial = 1; 19 | 20 | for (int currenNum = 1; currenNum <= n; currenNum++) 21 | { 22 | factorial = factorial * currenNum; 23 | } 24 | 25 | return factorial; 26 | } 27 | 28 | public static int CountTrailingZeros(BigInteger num) 29 | { 30 | int zerosCount = 0; 31 | BigInteger lastDigit = 0; 32 | 33 | while (lastDigit == 0) 34 | { 35 | lastDigit = num % 10; 36 | if (lastDigit == 0) 37 | { 38 | zerosCount++; 39 | } 40 | 41 | num /= 10; 42 | } 43 | 44 | return zerosCount; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/FibonacciNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/FibonacciNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FibonacciNumbers 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int n = int.Parse(Console.ReadLine()); 10 | Fib(n); 11 | } 12 | 13 | public static void Fib(int n) 14 | { 15 | if (n == 0 || n == 1) 16 | { 17 | Console.WriteLine(1); 18 | } 19 | else 20 | { 21 | int firstNum = 1; 22 | int secondNum = 1; 23 | int currentNum = 0; 24 | 25 | for (int i = 2; i <= n; i++) 26 | { 27 | currentNum = firstNum + secondNum; 28 | firstNum = secondNum; 29 | secondNum = currentNum; 30 | } 31 | 32 | Console.WriteLine(currentNum); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/GeometryCalculator/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/GreaterofTwoValues/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/Hello, Name/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/Hello, Name/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace HelloName 4 | { 5 | public class HelloName 6 | { 7 | public static void Main() 8 | { 9 | string inputName = Console.ReadLine(); 10 | HelloGreeting(inputName); 11 | } 12 | 13 | public static void HelloGreeting(string name) 14 | { 15 | Console.WriteLine("Hello, {0}!", name); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/HolidaysBetweenTwoDates/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/HolidaysBetweenTwoDates/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | 4 | namespace HolidaysBetweenTwoDates 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | DateTime startDate = DateTime.ParseExact(Console.ReadLine(), 11 | "d.M.yyyy", CultureInfo.InvariantCulture); 12 | DateTime endDate = DateTime.ParseExact(Console.ReadLine(), 13 | "d.M.yyyy", CultureInfo.InvariantCulture); 14 | int holidaysCount = 0; 15 | 16 | for (DateTime date = startDate; date <= endDate; date = date.AddDays(1)) 17 | { 18 | if (date.DayOfWeek == DayOfWeek.Saturday || 19 | date.DayOfWeek == DayOfWeek.Sunday) 20 | { 21 | holidaysCount++; 22 | } 23 | } 24 | 25 | Console.WriteLine(holidaysCount); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/InstructionSet/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/LongerLine/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/LongerLine/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("LongerLine")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("LongerLine")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("f8a8bd3d-8b96-4483-bea7-c8e62b5b2cd9")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MasterNumber/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MathPower/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MathPower/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MathPower 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | double number = double.Parse(Console.ReadLine()); 10 | int power = int.Parse(Console.ReadLine()); 11 | 12 | double numberOnPower = NumPowered(number, power); 13 | Console.WriteLine(numberOnPower); 14 | } 15 | 16 | public static double NumPowered(double number, int power) 17 | { 18 | double result = 1; 19 | 20 | for (int i = 1; i <= power; i++) 21 | { 22 | result *= number; 23 | } 24 | 25 | return result; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MathPower/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("MathPower")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("MathPower")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("ca8e28e8-0a3f-458a-9797-8e5ceaca47fa")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MaxMethod/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MaxMethod/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MaxMethod 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int num1 = int.Parse(Console.ReadLine()); 10 | int num2 = int.Parse(Console.ReadLine()); 11 | int num3 = int.Parse(Console.ReadLine()); 12 | int biggestNum = GetMaxInt(num1, num2, num3); 13 | 14 | Console.WriteLine(biggestNum); 15 | } 16 | 17 | public static int GetMaxInt(int number1, int number2, int number3) 18 | { 19 | int biggestNumber = Math.Max(Math.Max(number1, number2), number3); 20 | return biggestNumber; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MaxMethod/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("MaxMethod")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("MaxMethod")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("d18e1bb8-ecb6-4cdb-9e8c-e3a02f527e97")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MultiplyEvensbyOdds/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/MultiplyEvensbyOdds/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MultiplyEvensbyOdds 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int number = int.Parse(Console.ReadLine()); 10 | int sumOdds = GetSumOfOddDigits(number); 11 | int sumEvens = GetSumOfEvenDigits(number); 12 | 13 | Console.WriteLine(sumOdds * sumEvens); 14 | } 15 | 16 | public static int GetSumOfEvenDigits(int number) 17 | { 18 | number = Math.Abs(number); 19 | int sumEvens = 0; 20 | 21 | for (int i = 0; number > 0; i++) 22 | { 23 | int digit = number % 10; 24 | if (digit % 2 == 0) 25 | { 26 | sumEvens += digit; 27 | } 28 | 29 | number = number / 10; 30 | } 31 | 32 | return sumEvens; 33 | } 34 | 35 | public static int GetSumOfOddDigits(int number) 36 | { 37 | number = Math.Abs(number); 38 | int sumOdds = 0; 39 | 40 | for (int i = 0; number > 0; i++) 41 | { 42 | int digit = number % 10; 43 | 44 | if (digit % 2 != 0) 45 | { 46 | sumOdds += digit; 47 | } 48 | 49 | number = number / 10; 50 | } 51 | 52 | return sumOdds; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/NumbersinReversedOrder/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/NumbersinReversedOrder/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NumbersinReversedOrder 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string number = Console.ReadLine(); 10 | ReverseNumber(number); 11 | } 12 | 13 | public static void ReverseNumber(string num) 14 | { 15 | for (int i = num.Length - 1; i >= 0; i--) 16 | { 17 | Console.Write(num[i]); 18 | } 19 | 20 | Console.WriteLine(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/PriceChangeAlert/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/PrimeChecker/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/PrimeChecker/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PrimeChecker 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | long number = long.Parse(Console.ReadLine()); 10 | 11 | IsPrime(number); 12 | } 13 | 14 | public static void IsPrime(long num) 15 | { 16 | bool isPrime = true; 17 | 18 | if (num == 0 || num == 1) 19 | { 20 | isPrime = false; 21 | } 22 | else 23 | { 24 | for (int divisor = 2; divisor <= Math.Sqrt(num); divisor++) 25 | { 26 | if (num % divisor == 0) 27 | { 28 | isPrime = false; 29 | } 30 | } 31 | } 32 | 33 | Console.WriteLine(isPrime); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/PrimesinGivenRange/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/PrintingTriangle/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/PrintingTriangle/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PrintingTriangle 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int n = int.Parse(Console.ReadLine()); 10 | PrintTringle(n); 11 | } 12 | 13 | public static void PrintTringle(int number) 14 | { 15 | for (int row = 1; row <= number; row++) 16 | { 17 | for (int col = 1; col <= row; col++) 18 | { 19 | Console.Write($"{col} "); 20 | } 21 | 22 | Console.WriteLine(); 23 | } 24 | 25 | for (int row = number - 1; row >= 1; row--) 26 | { 27 | for (int col = 1; col <= row; col++) 28 | { 29 | Console.Write($"{col} "); 30 | } 31 | 32 | Console.WriteLine(); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/SequenceOfCommands/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/SignofIntegerNumber/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/SignofIntegerNumber/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SignofIntegerNumber 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int inputNum = int.Parse(Console.ReadLine()); 10 | PrintSignOfaNumber(inputNum); 11 | } 12 | 13 | public static void PrintSignOfaNumber(int number) 14 | { 15 | if (number > 0) 16 | { 17 | Console.WriteLine($"The number {number} is positive."); 18 | } 19 | else if (number < 0) 20 | { 21 | Console.WriteLine($"The number {number} is negative."); 22 | } 23 | else 24 | { 25 | Console.WriteLine($"The number {number} is zero."); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/Substring/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/Substring/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class Substring_broken 4 | { 5 | public static void Main() 6 | { 7 | string text = Console.ReadLine(); 8 | int jump = int.Parse(Console.ReadLine()); 9 | 10 | const char Search = 'p'; 11 | bool hasMatch = false; 12 | 13 | for (int i = 0; i < text.Length; i++) 14 | { 15 | if (text[i] == Search) 16 | { 17 | hasMatch = true; 18 | 19 | int endIndex = jump + 1; 20 | 21 | if (endIndex + i > text.Length) 22 | { 23 | endIndex = text.Length - i; 24 | } 25 | 26 | string matchedString = text.Substring(i, endIndex); 27 | Console.WriteLine(matchedString); 28 | i += jump; 29 | } 30 | } 31 | 32 | if (!hasMatch) 33 | { 34 | Console.WriteLine("no"); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /3MethodsAndDebugging/Substring/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Substring")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("Substring")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("a8d95c76-ebed-4726-8a34-3fe2d0f2551a")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /4ArraysAndLists/AppendLists/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/AppendLists/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace AppendLists 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | List inputList = Console.ReadLine().Split('|').ToList(); 12 | inputList.Reverse(); 13 | List result = new List(); 14 | 15 | foreach (string input in inputList) 16 | { 17 | List nums = input.Split().ToList(); 18 | 19 | foreach (string num in nums) 20 | { 21 | if (num != string.Empty) 22 | { 23 | result.Add(num); 24 | } 25 | } 26 | } 27 | 28 | Console.WriteLine(string.Join(" ", result)); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /4ArraysAndLists/ArrayManipulator/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/BombNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/BombNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace BombNumbers 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | List nums = Console.ReadLine().Split().Select(int.Parse).ToList(); 12 | string[] parameters = Console.ReadLine().Split(); 13 | int target = int.Parse(parameters[0]); 14 | int radius = int.Parse(parameters[1]); 15 | 16 | for (int i = 0; i < nums.Count; i++) 17 | { 18 | if (nums[i] == target) 19 | { 20 | int startIndex = Math.Max(0, i - radius); 21 | int blast = Math.Min((2 * radius) + 1, nums.Count - startIndex); 22 | nums.RemoveRange(startIndex, blast); 23 | i = -1; // We put "i" to be -1 in order to check all the elements again 24 | } 25 | } 26 | 27 | long sum = 0; 28 | 29 | for (int i = 0; i < nums.Count; i++) 30 | { 31 | sum += nums[i]; 32 | } 33 | 34 | Console.WriteLine(sum); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /4ArraysAndLists/BombNumbers/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("BombNumbers")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("BombNumbers")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("1ed96012-839a-4679-a3f5-2e3b8e126d93")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /4ArraysAndLists/CompareCharArrays/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/CondenseArraytoNumber/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/CondenseArraytoNumber/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CondenseArraytoNumber 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] arrStr = Console.ReadLine().Split(); 10 | int[] arrNums = new int[arrStr.Length]; 11 | 12 | for (int i = 0; i < arrNums.Length; i++) 13 | { 14 | arrNums[i] = int.Parse(arrStr[i]); 15 | } 16 | 17 | while (arrNums.Length > 1) 18 | { 19 | int[] condensed = new int[arrNums.Length - 1]; 20 | 21 | for (int i = 0; i < condensed.Length; i++) 22 | { 23 | condensed[i] = arrNums[i] + arrNums[i + 1]; 24 | } 25 | 26 | arrNums = condensed; 27 | } 28 | 29 | Console.WriteLine(string.Join(" ", arrNums)); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /4ArraysAndLists/CountNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/CountNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace SortNumbers 6 | { 7 | public class SortNumbers 8 | { 9 | public static void Main() 10 | { 11 | List nums = Console.ReadLine().Split().Select(int.Parse).ToList(); 12 | nums.Sort(); 13 | 14 | int count = 1; 15 | 16 | for (int i = 0; i <= nums.Count - 1; i++) 17 | { 18 | // If there is no next index we print the current number and its count: 19 | if ((i + 1) > nums.Count - 1) 20 | { 21 | Console.WriteLine("{0} -> {1}", nums[i], count); 22 | } 23 | else if (nums[i] == nums[i + 1]) 24 | { 25 | count++; 26 | } 27 | else if (nums[i] != nums[i + 1]) 28 | { 29 | Console.WriteLine("{0} -> {1}", nums[i], count); 30 | count = 1; 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /4ArraysAndLists/DayofWeek/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/DayofWeek/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DayofWeek 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int dayNumber = int.Parse(Console.ReadLine()); 10 | string[] weekDays = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; 11 | 12 | if (dayNumber >= 1 && dayNumber <= 7) 13 | { 14 | Console.WriteLine(weekDays[dayNumber - 1]); 15 | } 16 | else 17 | { 18 | Console.WriteLine("Invalid Day!"); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /4ArraysAndLists/DayofWeek/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DayofWeek")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("DayofWeek")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("6e6e169b-52c0-43c5-8193-ad630f63a4b2")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /4ArraysAndLists/EqualSums/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/EqualSums/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EqualSums 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] input = Console.ReadLine().Split(); 10 | int[] nums = new int[input.Length]; 11 | 12 | for (int i = 0; i < nums.Length; i++) 13 | { 14 | nums[i] = int.Parse(input[i]); 15 | } 16 | 17 | int index = 0; 18 | 19 | for (int i = 0; i < nums.Length; i++) 20 | { 21 | int leftSum = 0; 22 | int rightSum = 0; 23 | index = i; 24 | 25 | for (int numLeft = 0; numLeft <= i - 1; numLeft++) 26 | { 27 | leftSum += nums[numLeft]; 28 | } 29 | 30 | for (int numRight = i + 1; numRight < nums.Length; numRight++) 31 | { 32 | rightSum += nums[numRight]; 33 | } 34 | 35 | if (leftSum == rightSum) 36 | { 37 | Console.WriteLine(index); 38 | return; 39 | } 40 | } 41 | 42 | Console.WriteLine("no"); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /4ArraysAndLists/EqualSums/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("EqualSums")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("EqualSums")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("2c70b04a-dba0-4b4d-913f-daec52827c75")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /4ArraysAndLists/ExtractMiddleElements/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/FoldandSum/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/FoldandSum/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FoldandSum")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FoldandSum")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("6439d0cf-763a-47a7-889b-305d271a2a5c")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /4ArraysAndLists/Index of Letters/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/Index of Letters/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace IndexofLetters 4 | { 5 | public class IndexofLetters 6 | { 7 | public static void Main() 8 | { 9 | char[] alphabet = new char[26]; 10 | 11 | for (int i = 0; i < alphabet.Length; i++) 12 | { 13 | alphabet[i] = (char)('a' + i); 14 | } 15 | 16 | char[] input = Console.ReadLine().ToCharArray(); 17 | 18 | for (int i = 0; i < input.Length; i++) 19 | { 20 | int alphabetIndex = 0; 21 | 22 | // For each of the letters in the input word we check every letter from the alphabet and if there is a match we print the respective index: 23 | for (int j = 0; j < alphabet.Length; j++) 24 | { 25 | if (input[i] == alphabet[j]) 26 | { 27 | alphabetIndex = j; 28 | break; 29 | } 30 | } 31 | 32 | Console.WriteLine("{0} -> {1}", input[i], alphabetIndex); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /4ArraysAndLists/LargestCommonEnd/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/LargestCommonEnd/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LargestCommonEnd 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] firstInput = Console.ReadLine().Split(); 10 | string[] secondInput = Console.ReadLine().Split(); 11 | 12 | int shorterArray = Math.Min(firstInput.Length, secondInput.Length); 13 | int leftCounter = 0; 14 | int rightCounter = 0; 15 | 16 | // Scanning from left to right: 17 | for (int leftIndex = 0; leftIndex < shorterArray; leftIndex++) 18 | { 19 | if (firstInput[leftIndex] == secondInput[leftIndex]) 20 | { 21 | leftCounter++; 22 | } 23 | else 24 | { 25 | break; 26 | } 27 | } 28 | 29 | // Scanning from right to left: 30 | for (int rightIndex = 0; rightIndex < shorterArray; rightIndex++) 31 | { 32 | if (firstInput[firstInput.Length - 1 - rightIndex] == secondInput[secondInput.Length - 1 - rightIndex]) 33 | { 34 | rightCounter++; 35 | } 36 | else 37 | { 38 | break; 39 | } 40 | } 41 | 42 | Console.WriteLine(Math.Max(leftCounter, rightCounter)); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /4ArraysAndLists/LastKNumbersSums/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/LastKNumbersSums/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LastKNumbersSums 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | long n = long.Parse(Console.ReadLine()); 10 | long k = long.Parse(Console.ReadLine()); 11 | 12 | long[] arrInt = new long[n]; 13 | arrInt[0] = 1; 14 | 15 | for (int i = 1; i < arrInt.Length; i++) 16 | { 17 | long sum = 0; 18 | int currentIndex = i; 19 | for (int j = 1; j <= k; j++) 20 | { 21 | if (currentIndex - k < 0) 22 | { 23 | currentIndex++; 24 | continue; 25 | } 26 | 27 | sum += arrInt[currentIndex - k]; 28 | currentIndex++; 29 | } 30 | 31 | arrInt[i] = sum; 32 | } 33 | 34 | Console.WriteLine(string.Join(" ", arrInt)); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /4ArraysAndLists/ListsMaxSequenceofEqualElements/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/MaxSequenceofEqualElements/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/MaxSequenceofIncreasingElements/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/MaxSequenceofIncreasingElements/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MaxSequenceofIncreasingElements 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] input = Console.ReadLine().Split(); 10 | int[] nums = new int[input.Length]; 11 | 12 | for (int i = 0; i < nums.Length; i++) 13 | { 14 | nums[i] = int.Parse(input[i]); 15 | } 16 | 17 | int startPos = 0; 18 | int bestPos = 0; 19 | int length = 1; 20 | int bestLen = 0; 21 | 22 | for (int i = 1; i < nums.Length; i++) 23 | { 24 | if (nums[i] > nums[i - 1]) 25 | { 26 | length++; 27 | 28 | if (length == 2) 29 | { 30 | startPos = i - 1; 31 | } 32 | 33 | if (length > bestLen) 34 | { 35 | bestLen = length; 36 | bestPos = startPos; 37 | } 38 | } 39 | else 40 | { 41 | length = 1; 42 | } 43 | } 44 | 45 | for (int i = bestPos; i < (bestPos + bestLen); i++) 46 | { 47 | Console.Write(nums[i] + " "); 48 | } 49 | 50 | Console.WriteLine(); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /4ArraysAndLists/MostFrequentNumber/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/MostFrequentNumber/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MostFrequentNumber 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] input = Console.ReadLine().Split(); 10 | int[] nums = new int[input.Length]; 11 | 12 | for (int i = 0; i < nums.Length; i++) 13 | { 14 | nums[i] = int.Parse(input[i]); 15 | } 16 | 17 | int biggestOccurence = 0; 18 | int mostFrequentNum = 0; 19 | 20 | for (int i = 0; i < nums.Length; i++) 21 | { 22 | int currentNum = nums[i]; 23 | int occurrences = 1; 24 | 25 | for (int j = i + 1; j < nums.Length; j++) 26 | { 27 | if (currentNum == nums[j]) 28 | { 29 | occurrences++; 30 | } 31 | } 32 | 33 | if (occurrences > biggestOccurence) 34 | { 35 | biggestOccurence = occurrences; 36 | mostFrequentNum = currentNum; 37 | } 38 | } 39 | 40 | Console.WriteLine(mostFrequentNum); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /4ArraysAndLists/PairsbyDifference/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/PairsbyDifference/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PairsbyDifference 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] input = Console.ReadLine().Split(); 10 | int difference = int.Parse(Console.ReadLine()); 11 | 12 | int[] nums = new int[input.Length]; 13 | 14 | for (int i = 0; i < nums.Length; i++) 15 | { 16 | nums[i] = int.Parse(input[i]); 17 | } 18 | 19 | int counter = 0; 20 | 21 | for (int i = 0; i < nums.Length; i++) 22 | { 23 | int currentNum = nums[i]; 24 | 25 | for (int j = 0; j < nums.Length; j++) 26 | { 27 | if (currentNum - nums[j] == difference && currentNum - nums[j] > 0) 28 | { 29 | counter++; 30 | } 31 | } 32 | } 33 | 34 | Console.WriteLine(counter); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /4ArraysAndLists/RemoveNegativesandReverse/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/RemoveNegativesandReverse/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace RemoveNegativesandReverse 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | List listStr = Console.ReadLine().Split(' ').ToList(); 12 | List listInts = new List(); 13 | 14 | foreach (string element in listStr) 15 | { 16 | listInts.Add(int.Parse(element)); 17 | } 18 | 19 | for (int i = 0; i < listInts.Count; i++) 20 | { 21 | if (listInts[i] < 0) 22 | { 23 | listInts.Remove(listInts[i]); 24 | i--; 25 | } 26 | } 27 | 28 | if (listInts.Count != 0) 29 | { 30 | listInts.Reverse(); 31 | Console.WriteLine(string.Join(" ", listInts)); 32 | } 33 | else 34 | { 35 | Console.WriteLine("empty"); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /4ArraysAndLists/ReverseArrayofIntegers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/ReverseArrayofIntegers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ReverseArrayofIntegers 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int arraySize = int.Parse(Console.ReadLine()); 10 | 11 | int[] intArray = new int[arraySize]; 12 | 13 | for (int inputIndex = 0; inputIndex < intArray.Length; inputIndex++) 14 | { 15 | intArray[inputIndex] = int.Parse(Console.ReadLine()); 16 | } 17 | 18 | Console.WriteLine(); 19 | 20 | for (int arrIndex = 0; arrIndex < intArray.Length / 2; arrIndex++) 21 | { 22 | int currentNum = intArray[arrIndex]; 23 | intArray[arrIndex] = intArray[intArray.Length - arrIndex - 1]; 24 | intArray[intArray.Length - arrIndex - 1] = currentNum; 25 | } 26 | 27 | Console.WriteLine(string.Join(" ", intArray)); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /4ArraysAndLists/ReverseArrayofStrings/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/ReverseArrayofStrings/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ReverseArrayofStrings 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] strArr = Console.ReadLine().Split(); 10 | 11 | string[] reversedArr = new string[strArr.Length]; 12 | 13 | for (int i = 0; i < strArr.Length; i++) 14 | { 15 | reversedArr[i] = strArr[strArr.Length - 1 - i]; 16 | } 17 | 18 | Console.WriteLine(string.Join(" ", reversedArr)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /4ArraysAndLists/RotateandSum/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/RotateandSum/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RotateandSum 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] inputArray = Console.ReadLine().Split(); 10 | int rotations = int.Parse(Console.ReadLine()); 11 | 12 | int[] numsArray = new int[inputArray.Length]; 13 | 14 | // Parsing the string numbers to integers: 15 | for (int i = 0; i < inputArray.Length; i++) 16 | { 17 | numsArray[i] = int.Parse(inputArray[i]); 18 | } 19 | 20 | int[] sumArray = new int[numsArray.Length]; 21 | 22 | for (int rotation = 0; rotation < rotations; rotation++) 23 | { 24 | int mostRightNum = numsArray[numsArray.Length - 1]; 25 | 26 | for (int i = 0; i < numsArray.Length - 1; i++) 27 | { 28 | numsArray[numsArray.Length - 1 - i] = numsArray[numsArray.Length - 2 - i]; 29 | } 30 | 31 | numsArray[0] = mostRightNum; 32 | 33 | for (int i = 0; i < sumArray.Length; i++) 34 | { 35 | sumArray[i] = sumArray[i] + numsArray[i]; 36 | } 37 | } 38 | 39 | Console.WriteLine(string.Join(" ", sumArray)); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /4ArraysAndLists/RoundingNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/RoundingNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RoundingNumbers 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] inputArray = Console.ReadLine().Split(); 10 | 11 | double[] arrayNums = new double[inputArray.Length]; 12 | 13 | for (int i = 0; i < arrayNums.Length; i++) 14 | { 15 | arrayNums[i] = double.Parse(inputArray[i]); 16 | } 17 | 18 | for (int i = 0; i < arrayNums.Length; i++) 19 | { 20 | double roundedNum = Math.Round(arrayNums[i], MidpointRounding.AwayFromZero); 21 | Console.WriteLine("{0} => {1}", arrayNums[i], roundedNum); 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /4ArraysAndLists/SieveofEratosthenes/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/SortNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/SortNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace SortNumbers 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | List input = Console.ReadLine().Split().ToList(); 12 | List numbers = new List(); 13 | 14 | foreach (string strNum in input) 15 | { 16 | numbers.Add(decimal.Parse(strNum)); 17 | } 18 | 19 | numbers.Sort(); 20 | 21 | for (int i = 0; i < numbers.Count; i++) 22 | { 23 | if (i == numbers.Count - 1) 24 | { 25 | Console.Write("{0}", numbers[i]); 26 | } 27 | else 28 | { 29 | Console.Write("{0} <= ", numbers[i]); 30 | } 31 | } 32 | 33 | Console.WriteLine(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /4ArraysAndLists/SortNumbers/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("SortNumbers")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("SortNumbers")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("ede9773e-e867-43dd-bc1f-10c2cd50ffd6")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /4ArraysAndLists/SplitbyWordCasing/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/SquareNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/SquareNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace SortNumbers 6 | { 7 | public class SortNumbers 8 | { 9 | public static void Main() 10 | { 11 | List input = Console.ReadLine().Split().ToList(); 12 | List output = new List(); 13 | 14 | foreach (string strNum in input) 15 | { 16 | int num = int.Parse(strNum); 17 | 18 | if (Math.Sqrt(num) == (int)Math.Sqrt(num)) 19 | { 20 | output.Add(num); 21 | } 22 | } 23 | 24 | output.Sort((a, b) => b.CompareTo(a)); 25 | 26 | Console.WriteLine(string.Join(" ", output)); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /4ArraysAndLists/SumAdjacentEqualNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/SumAdjacentEqualNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace SumAdjacentEqualNumbers 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | List input = Console.ReadLine().Split().ToList(); 12 | List nums = new List(); 13 | 14 | foreach (string inputNum in input) 15 | { 16 | nums.Add(double.Parse(inputNum)); 17 | } 18 | 19 | for (int i = 0; i < nums.Count - 1; i++) 20 | { 21 | if (nums[i] == nums[i + 1]) 22 | { 23 | nums[i] = nums[i] + nums[i + 1]; 24 | nums.Remove(nums[i + 1]); 25 | i = -1; // In order the loop to start from the beginning after the modification of the list 26 | } 27 | } 28 | 29 | Console.WriteLine(string.Join(" ", nums)); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /4ArraysAndLists/SumArrays/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/SumArrays/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SumArrays 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] arr1 = Console.ReadLine().Split(); 10 | string[] arr2 = Console.ReadLine().Split(); 11 | 12 | // creating and populating 2 int arrays: 13 | int[] arr1Nums = new int[arr1.Length]; 14 | int[] arr2Nums = new int[arr2.Length]; 15 | 16 | for (int i = 0; i < arr1Nums.Length; i++) 17 | { 18 | arr1Nums[i] = int.Parse(arr1[i]); 19 | } 20 | 21 | for (int i = 0; i < arr2Nums.Length; i++) 22 | { 23 | arr2Nums[i] = int.Parse(arr2[i]); 24 | } 25 | 26 | // getting the length of the bigger array: 27 | int biggerArrLength = Math.Max(arr1Nums.Length, arr2Nums.Length); 28 | 29 | // creating an array that will hold the sum with length equal to the bigger length 30 | int[] sumArr = new int[biggerArrLength]; 31 | 32 | for (int i = 0; i < sumArr.Length; i++) 33 | { 34 | sumArr[i] = arr1Nums[i % arr1Nums.Length] + arr2Nums[i % arr2Nums.Length]; 35 | } 36 | 37 | Console.WriteLine(string.Join(" ", sumArr)); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /4ArraysAndLists/SumArrays/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("SumArrays")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("SumArrays")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("469f25f0-7d22-449d-9b56-f82980b1ad02")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /4ArraysAndLists/SumReversedNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/SumReversedNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace SumReversedNumbers 6 | { 7 | public class SumReversedNumbers 8 | { 9 | public static void Main() 10 | { 11 | List input = Console.ReadLine().Split().ToList(); 12 | List reversedNums = new List(); 13 | 14 | for (int i = 0; i < input.Count; i++) 15 | { 16 | string strNum = input[i]; 17 | char[] element = strNum.ToCharArray(); 18 | char[] reversed = element.Reverse().ToArray(); 19 | reversedNums.Add(int.Parse(string.Join(string.Empty, reversed))); 20 | } 21 | 22 | int sum = 0; 23 | 24 | for (int i = 0; i < reversedNums.Count; i++) 25 | { 26 | sum += reversedNums[i]; 27 | } 28 | 29 | Console.WriteLine(sum); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /4ArraysAndLists/Template/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/Template/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Template 6 | { 7 | public class Program 8 | { 9 | public static void Main() 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /4ArraysAndLists/TemplatePublic/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/TemplatePublic/Square Numbers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace SortNumbers 6 | { 7 | public class SortNumbers 8 | { 9 | public static void Main() 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /4ArraysAndLists/TrippleSum/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /4ArraysAndLists/TrippleSum/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TrippleSum 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] arrayString = Console.ReadLine().Split(); 10 | 11 | int[] arrayInt = new int[arrayString.Length]; 12 | 13 | for (int inputIndex = 0; inputIndex < arrayInt.Length; inputIndex++) 14 | { 15 | arrayInt[inputIndex] = int.Parse(arrayString[inputIndex]); 16 | } 17 | 18 | bool isFound = false; 19 | for (int a = 0; a < arrayInt.Length - 1; a++) 20 | { 21 | for (int b = a + 1; b < arrayInt.Length; b++) 22 | { 23 | for (int c = 0; c < arrayInt.Length; c++) 24 | { 25 | if (arrayInt[a] + arrayInt[b] == arrayInt[c]) 26 | { 27 | Console.WriteLine("{0} + {1} == {2}", arrayInt[a], arrayInt[b], arrayInt[c]); 28 | isFound = true; 29 | break; 30 | } 31 | } 32 | } 33 | } 34 | 35 | if (!isFound) 36 | { 37 | Console.WriteLine("No"); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /4ArraysAndLists/TrippleSum/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("TrippleSum")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("TrippleSum")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("65252d66-5b44-430f-aeb8-204c66c49417")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/AMinerTask/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/AMinerTask/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AMinerTask 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | Dictionary resources = new Dictionary(); 11 | string product = Console.ReadLine(); 12 | 13 | while (!product.Equals("stop")) 14 | { 15 | int quantity = int.Parse(Console.ReadLine()); 16 | 17 | if (resources.ContainsKey(product)) 18 | { 19 | resources[product] += quantity; 20 | } 21 | else 22 | { 23 | resources[product] = quantity; 24 | } 25 | 26 | product = Console.ReadLine(); 27 | } 28 | 29 | foreach (string entry in resources.Keys) 30 | { 31 | Console.WriteLine($"{entry} -> {resources[entry]}"); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/AMinerTask/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("AMinerTask")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("AMinerTask")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("fa11e5a8-a2c2-421e-92fc-54683e24b08a")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/CountRealNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/CountRealNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CountRealNumbers 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string[] input = Console.ReadLine().Split(); 11 | SortedDictionary numsAndCounts = new SortedDictionary(); 12 | 13 | foreach (string numStr in input) 14 | { 15 | double number = double.Parse(numStr); 16 | 17 | if (numsAndCounts.ContainsKey(number)) 18 | { 19 | numsAndCounts[number]++; 20 | } 21 | else 22 | { 23 | numsAndCounts[number] = 1; 24 | } 25 | } 26 | 27 | foreach (double num in numsAndCounts.Keys) 28 | { 29 | Console.WriteLine("{0} -> {1}", num, numsAndCounts[num]); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/DragonArmy/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/DragonArmy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DragonArmy")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("DragonArmy")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("db197dc3-4378-49fa-91e3-7e7391936675")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/FixEmails/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/FixEmails/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace FixEmails 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | Dictionary database = new Dictionary(); 12 | string name = Console.ReadLine(); 13 | 14 | while (!name.Equals("stop")) 15 | { 16 | string inputEmail = Console.ReadLine(); 17 | database.Add(name, inputEmail); 18 | name = Console.ReadLine(); 19 | } 20 | 21 | string[] domains = { ".uk", ".us" }; 22 | 23 | foreach (string domain in domains) 24 | { 25 | List> filteredDatabase = database.Where(x => x.Value.EndsWith(domain)).ToList(); 26 | foreach (KeyValuePair entry in filteredDatabase) 27 | { 28 | database.Remove(entry.Key); 29 | } 30 | } 31 | 32 | foreach (KeyValuePair entry in database) 33 | { 34 | Console.WriteLine("{0} -> {1}", entry.Key, entry.Value); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/FixEmails/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FixEmails")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FixEmails")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("8c1f401e-26b1-4171-8bf2-2950e015e36b")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/FoldandSum/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/FoldandSum/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace FoldandSum 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray(); 11 | int k = input.Length / 4; 12 | 13 | int[] row1Left = input.Take(k).Reverse().ToArray(); 14 | int[] row1Right = input.Skip(3 * k).Reverse().ToArray(); 15 | int[] row1 = row1Left.Concat(row1Right).ToArray(); 16 | 17 | int[] row2 = input.Skip(k).Take(2 * k).ToArray(); 18 | 19 | int[] result = row1.Select((num, i) => num + row2[i]).ToArray(); 20 | 21 | // for (int i = 0; i < result.Length; i++) 22 | // { 23 | // result[i] = row1[i] + row2[i]; 24 | // } 25 | Console.WriteLine(string.Join(" ", result)); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/FoldandSum/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FoldandSum")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FoldandSum")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("cbd13031-1292-4908-af4e-29f40fb4f75a")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/HandsOfCards/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/Largest3Numbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/Largest3Numbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace Largest3Numbers 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | double[] numbers = Console.ReadLine().Split().Select(double.Parse).ToArray(); 11 | double[] result = numbers.OrderByDescending(num => num).Take(3).ToArray(); 12 | Console.WriteLine(string.Join(" ", result)); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/LegendaryFarming/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/LogsAggregator/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/MinMaxSumAverage/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/MinMaxSumAverage/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace MinMaxSumAverage 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | int n = int.Parse(Console.ReadLine()); 11 | 12 | int[] numbers = new int[n]; 13 | 14 | for (int i = 0; i < numbers.Length; i++) 15 | { 16 | numbers[i] = int.Parse(Console.ReadLine()); 17 | } 18 | 19 | int sum = numbers.Sum(); 20 | int min = numbers.Min(); 21 | int max = numbers.Max(); 22 | double average = numbers.Average(); 23 | 24 | Console.WriteLine("Sum = {0}", sum); 25 | Console.WriteLine("Min = {0}", min); 26 | Console.WriteLine("Max = {0}", max); 27 | Console.WriteLine("Average = {0}", average); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/OddOccurrences/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/OddOccurrences/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace OddOccurrences 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string[] input = Console.ReadLine().ToLower().Split(); 11 | 12 | Dictionary words = new Dictionary(); 13 | 14 | foreach (string item in input) 15 | { 16 | if (words.ContainsKey(item)) 17 | { 18 | words[item]++; 19 | } 20 | else 21 | { 22 | words[item] = 1; 23 | } 24 | } 25 | 26 | List results = new List(); 27 | 28 | foreach (string word in words.Keys) 29 | { 30 | if (words[word] % 2 != 0) 31 | { 32 | results.Add(word); 33 | } 34 | } 35 | 36 | Console.WriteLine(string.Join(", ", results)); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/Phonebook/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/Phonebook/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Phonebook 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string[] input = Console.ReadLine().Split(); 11 | Dictionary phonebook = new Dictionary(); 12 | string command = input[0]; 13 | 14 | while (!command.Equals("END")) 15 | { 16 | switch (command) 17 | { 18 | case "A": 19 | string name = input[1]; 20 | string phone = input[2]; 21 | 22 | phonebook[name] = phone; 23 | break; 24 | 25 | case "S": 26 | 27 | name = input[1]; 28 | 29 | if (phonebook.ContainsKey(name)) 30 | { 31 | Console.WriteLine("{0} -> {1}", name, phonebook[name]); 32 | } 33 | else 34 | { 35 | Console.WriteLine($"Contact {name} does not exist."); 36 | } 37 | 38 | break; 39 | } 40 | 41 | input = Console.ReadLine().Split(); 42 | command = input[0]; 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/Phonebook/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Phonebook")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("Phonebook")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("05f80d10-e1d8-4a60-a8ee-5b114ddbb2b8")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/PhonebookUpgrade/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/PopulationCounter/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/SerbianMusicUnleashed/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/ShortWordsSorted/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/ShortWordsSorted/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace ShortWordsSorted 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | char[] separators = { '.', ',', ';', '(', ')', '[', ']', '"', '\'', '\\', '/', '!', '?', ' ' }; 11 | string[] input = Console.ReadLine().ToLower().Split(separators); 12 | 13 | string[] result = input.Distinct().Where(word => word.Length < 5).Where(word => word != string.Empty).OrderBy(word => word).ToArray(); 14 | Console.WriteLine(string.Join(", ", result)); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/UserLogs/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /5DictionariesAndLINQ/UserLogs/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("UserLogs")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("UserLogs")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("a05c80b7-63f1-4dde-afd3-aab53f434b1d")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /6Objects-and-Classes/AdvertisementMessage/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/AdvertisementMessage/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AdvertisementMessage 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int n = int.Parse(Console.ReadLine()); 10 | 11 | string[] phrases = { "Excellent product.", "Such a great product.", "I always use that product.", "Best product of its category.", "Exceptional product.", "I can’t live without this product." }; 12 | string[] events = { "Now I feel good.", "I have succeeded with this product.", "Makes miracles.I am happy of the results!", "I cannot believe but now I feel awesome.", "Try it yourself, I am very satisfied.", "I feel great!" }; 13 | string[] authors = { "Diana", "Petya", "Stella", "Elena", "Katya", "Iva", "Annie", "Eva" }; 14 | string[] cities = { "Burgas", "Sofia", "Plovdiv", "Varna", "Ruse" }; 15 | 16 | Random rand = new Random(); 17 | 18 | for (int i = 0; i < n; i++) 19 | { 20 | string randomPhrase = phrases[rand.Next(phrases.Length)]; 21 | string randomEvent = events[rand.Next(events.Length)]; 22 | string randomAuthor = authors[rand.Next(authors.Length)]; 23 | string randomCity = cities[rand.Next(cities.Length)]; 24 | 25 | Console.WriteLine("{0} {1} {2} - {3}", randomPhrase, randomEvent, randomAuthor, randomCity); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /6Objects-and-Classes/AndreyAndBilliard/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/AverageGrades/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/BigFactorial/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/BigFactorial/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | 4 | namespace BigFactorial 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | int n = int.Parse(Console.ReadLine()); 11 | BigInteger factorial = 1; 12 | 13 | for (int i = 2; i <= n; i++) 14 | { 15 | factorial *= i; 16 | } 17 | 18 | Console.WriteLine(factorial); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /6Objects-and-Classes/BookLibrary/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/BookLibraryModification/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/CirclesIntersection/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/ClosestTwoPoints/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/CountWorkDays/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/DayOfWeek/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/DayOfWeek/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | 4 | namespace DayOfWeek 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string inputDate = Console.ReadLine(); 11 | DateTime date = DateTime.ParseExact(inputDate, "d-M-yyyy", CultureInfo.InvariantCulture); 12 | Console.WriteLine(date.DayOfWeek); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /6Objects-and-Classes/DistanceBetweenPoints/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/DistanceBetweenPoints/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace DistanceBetweenPoints 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | double[] inputP1 = Console.ReadLine().Split().Select(double.Parse).ToArray(); 11 | double[] inputP2 = Console.ReadLine().Split().Select(double.Parse).ToArray(); 12 | 13 | Point point1 = new Point 14 | { 15 | X = inputP1[0], 16 | Y = inputP1[1] 17 | }; 18 | 19 | Point point2 = new Point 20 | { 21 | X = inputP2[0], 22 | Y = inputP2[1] 23 | }; 24 | 25 | double distance = CalcDistance(point1, point2); 26 | Console.WriteLine("{0:F3}", distance); 27 | } 28 | 29 | public static double CalcDistance(Point p1, Point p2) 30 | { 31 | double distance = Math.Sqrt(Math.Pow(p1.X - p2.X, 2) + Math.Pow(p1.Y - p2.Y, 2)); 32 | return distance; 33 | } 34 | } 35 | 36 | public class Point 37 | { 38 | public double X { get; set; } 39 | 40 | public double Y { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /6Objects-and-Classes/MentorGroup/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/RandomizeWords/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/RandomizeWords/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RandomizeWords 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] words = Console.ReadLine().Split(); 10 | Random randNum = new Random(); 11 | int random = randNum.Next(words.Length); 12 | 13 | for (int i = 0; i < words.Length; i++) 14 | { 15 | string temp = words[i]; 16 | words[i] = words[random]; 17 | words[random] = temp; 18 | } 19 | 20 | foreach (string word in words) 21 | { 22 | Console.WriteLine(word); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /6Objects-and-Classes/RectanglePosition/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/SalesReport/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/StudentGroups/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /6Objects-and-Classes/TeamworkProjects/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /7FilesAndDirectories/FolderSize/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /7FilesAndDirectories/FolderSize/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace FolderSize 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string[] directoryFiles = Directory.GetFiles("TestFolder"); 11 | double size = 0; 12 | 13 | foreach (string file in directoryFiles) 14 | { 15 | FileInfo info = new FileInfo(file); 16 | size += info.Length; 17 | } 18 | 19 | size = size / 1024 / 1024; 20 | 21 | Console.WriteLine(size); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /7FilesAndDirectories/LineNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /7FilesAndDirectories/LineNumbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace LineNumbers 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] text = File.ReadAllLines("Input.txt"); 10 | 11 | if (File.Exists("Output.txt")) 12 | { 13 | File.Delete("Output.txt"); 14 | } 15 | 16 | for (int i = 0; i < text.Length; i++) 17 | { 18 | File.AppendAllText("Output.txt", string.Format("{0}. {1}\r\n", i + 1, text[i])); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /7FilesAndDirectories/MergeFiles/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /7FilesAndDirectories/MergeFiles/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace MergeFiles 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string[] firstFile = File.ReadAllLines("FileOne.txt"); 11 | string[] secondFile = File.ReadAllLines("FileTwo.txt"); 12 | 13 | if (File.Exists("result.txt")) 14 | { 15 | File.Delete("result.txt"); 16 | } 17 | 18 | for (int i = 0; i < firstFile.Length; i++) 19 | { 20 | File.AppendAllText("result.txt", firstFile[i] + Environment.NewLine + secondFile[i] + Environment.NewLine); 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /7FilesAndDirectories/OddLines/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /7FilesAndDirectories/OddLines/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace OddLines 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string[] text = File.ReadAllLines("Input.txt"); 11 | 12 | if (File.Exists("Output.txt")) 13 | { 14 | File.Delete("Output.txt"); 15 | } 16 | 17 | for (int i = 1; i < text.Length; i += 2) 18 | { 19 | File.AppendAllText("Output.txt", text[i] + Environment.NewLine); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /7FilesAndDirectories/OddLines/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("OddLines")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("OddLines")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("afbc83a1-276a-4317-ac62-100b92294116")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /7FilesAndDirectories/WordCount/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /7FilesAndDirectories/WordCount/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | 6 | namespace WordCount 7 | { 8 | public class Launcher 9 | { 10 | public static void Main() 11 | { 12 | string[] words = File.ReadAllText("words.txt").ToLower().Split(); 13 | char[] delimiters = new char[] { ' ', ',', '.', '!', '?', '-', '_', '+', '\r', '\n' }; 14 | string[] text = File.ReadAllText("text.txt").ToLower().Split(delimiters, StringSplitOptions.RemoveEmptyEntries); 15 | 16 | Dictionary wordsCount = new Dictionary(); 17 | 18 | foreach (string word in words) 19 | { 20 | wordsCount[word] = 0; 21 | } 22 | 23 | foreach (string word in text) 24 | { 25 | if (wordsCount.ContainsKey(word)) 26 | { 27 | wordsCount[word]++; 28 | } 29 | } 30 | 31 | if (File.Exists("results.txt")) 32 | { 33 | File.Delete("results.txt"); 34 | } 35 | 36 | foreach (KeyValuePair pair in wordsCount.OrderByDescending(p => p.Value)) 37 | { 38 | File.AppendAllText("results.txt", string.Format("{0} - {1}{2}", pair.Key, pair.Value, Environment.NewLine)); 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /8Strings-and-Regex/CharacterMultiplier/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/CharacterMultiplier/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CharacterMultiplier 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string input = Console.ReadLine(); 10 | int product = CharMultiplier(input); 11 | Console.WriteLine(product); 12 | } 13 | 14 | public static int CharMultiplier(string inputString) 15 | { 16 | string[] strings = inputString.Split(); 17 | string firstString = strings[0]; 18 | string secondString = strings[1]; 19 | int length = Math.Max(firstString.Length, secondString.Length); 20 | int result = 0; 21 | 22 | for (int i = 0; i < length; i++) 23 | { 24 | int firstStrCharASCIIcode = 1; 25 | int secondStrCharASCIIcode = 1; 26 | 27 | if (i < firstString.Length) 28 | { 29 | firstStrCharASCIIcode = firstString[i]; 30 | } 31 | 32 | if (i < secondString.Length) 33 | { 34 | secondStrCharASCIIcode = secondString[i]; 35 | } 36 | 37 | result += firstStrCharASCIIcode * secondStrCharASCIIcode; 38 | } 39 | 40 | return result; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ConvertBase-NtoBase-10/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ConvertBase-NtoBase-10/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | 4 | namespace ConvertBaseNtoBase10 5 | { 6 | public class ConvertBaseNtoBase10 7 | { 8 | public static void Main() 9 | { 10 | string[] input = Console.ReadLine().Split(); 11 | BigInteger baseValue = BigInteger.Parse(input[0]); 12 | BigInteger number = BigInteger.Parse(input[1]); 13 | BigInteger result = 0; 14 | int power = 0; 15 | BigInteger currentNum = 0; 16 | 17 | while (number > 0) 18 | { 19 | int mostRightDigit = (int)(number % 10); 20 | currentNum = mostRightDigit * BigInteger.Pow(baseValue, power); 21 | number = number / 10; 22 | power++; 23 | result += currentNum; 24 | } 25 | 26 | Console.WriteLine(result); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ConvertBase10toBaseN/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ConvertBase10toBaseN/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Numerics; 4 | using System.Text; 5 | 6 | namespace ConvertBase10toBaseN 7 | { 8 | public class Launcher 9 | { 10 | public static void Main() 11 | { 12 | string[] input = Console.ReadLine().Split(); 13 | int baseValue = int.Parse(input[0]); 14 | BigInteger number = BigInteger.Parse(input[1]); 15 | int remainder = 0; 16 | 17 | StringBuilder binary = new StringBuilder(); 18 | 19 | while (number > 0) 20 | { 21 | remainder = (int)(number % baseValue); 22 | binary.Append(remainder); 23 | number = number / baseValue; 24 | } 25 | 26 | Console.WriteLine(string.Join(string.Empty, binary.ToString().ToCharArray().Reverse())); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /8Strings-and-Regex/CountSubstringOccurrences/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/CountSubstringOccurrences/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CountSubstringOccurrences 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string input = Console.ReadLine().ToLower(); 10 | string pattern = Console.ReadLine().ToLower(); 11 | int counter = 0; 12 | int index = input.IndexOf(pattern); 13 | 14 | while (index != -1) 15 | { 16 | counter++; 17 | index = input.IndexOf(pattern, index + 1); 18 | } 19 | 20 | Console.WriteLine(counter); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ExtractEmails/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ExtractEmails/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.RegularExpressions; 3 | 4 | namespace ExtractEmails 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string pattern = @"(?:^|\s)([a-zA-Z0-9][\-\._a-zA-Z0-9]*)@[a-zA-Z\-]+(\.[a-z]+)+\b"; 11 | Regex regex = new Regex(pattern); 12 | 13 | string inputText = Console.ReadLine(); 14 | 15 | MatchCollection matches = regex.Matches(inputText); 16 | 17 | foreach (Match match in matches) 18 | { 19 | Console.WriteLine(match); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ExtractSsentencesByKeyword/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ExtractSsentencesByKeyword/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text.RegularExpressions; 5 | 6 | namespace ExtractSentencesByKeyword 7 | { 8 | public class ExtractSentencesByKeyword 9 | { 10 | public static void Main() 11 | { 12 | string keyWord = Console.ReadLine(); 13 | string[] sentences = Console.ReadLine().Split(new char[] { '.', '?', '!' }, StringSplitOptions.RemoveEmptyEntries); 14 | string pattern = @"\W"; // All non-letter chars 15 | List results = new List(); 16 | 17 | foreach (string sentence in sentences) 18 | { 19 | string[] words = Regex.Split(sentence, pattern); 20 | if (words.Any(w => w.Equals(keyWord))) 21 | { 22 | results.Add(sentence); 23 | } 24 | } 25 | 26 | foreach (string keySentence in results) 27 | { 28 | Console.WriteLine(keySentence.Trim()); 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /8Strings-and-Regex/LettersChangeNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/MagicExchangeableWords/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/MelrahShake/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/MelrahShake/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MelrahShake 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string text = Console.ReadLine(); 10 | string pattern = Console.ReadLine(); 11 | 12 | while (pattern.Length != 0) 13 | { 14 | int firstMatchIndex = text.IndexOf(pattern); 15 | int lastMatchIndex = text.LastIndexOf(pattern); 16 | 17 | if (firstMatchIndex != -1 && lastMatchIndex != -1) 18 | { 19 | text = text.Remove(firstMatchIndex, pattern.Length); 20 | text = text.Remove(lastMatchIndex - pattern.Length, pattern.Length); 21 | Console.WriteLine("Shaked it."); 22 | 23 | int pattIndex = pattern.Length / 2; 24 | pattern = pattern.Remove(pattIndex, 1); 25 | } 26 | else 27 | { 28 | Console.WriteLine("No shake."); 29 | Console.WriteLine(text); 30 | return; 31 | } 32 | } 33 | 34 | Console.WriteLine("No shake."); 35 | Console.WriteLine(text); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /8Strings-and-Regex/MultiplyBigNumber/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/Palindromes/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/Palindromes/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Palindromes 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | char[] delimiters = { ' ', ',', '.', '?', '!' }; 12 | string[] input = Console.ReadLine().Split(delimiters, StringSplitOptions.RemoveEmptyEntries); 13 | List palindromes = new List(); 14 | 15 | foreach (string word in input) 16 | { 17 | char[] currentWord = word.ToCharArray(); 18 | char[] wordReversed = word.ToCharArray(); 19 | Array.Reverse(wordReversed); 20 | 21 | string currentWordStr = string.Join(string.Empty, currentWord); 22 | string wordReversedStr = string.Join(string.Empty, wordReversed); 23 | 24 | if (currentWordStr.Equals(wordReversedStr)) 25 | { 26 | palindromes.Add(word); 27 | } 28 | } 29 | 30 | Console.WriteLine(string.Join(", ", palindromes.Distinct().OrderBy(p => p))); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /8Strings-and-Regex/QueryMess/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/QueryMess/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("QueryMess")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("QueryMess")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("e6881252-bcbe-41f7-8fdb-f5677228bf24")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ReplaceATag/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ReplaceATag/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.RegularExpressions; 3 | 4 | namespace ReplaceATag 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string text = Console.ReadLine(); 11 | while (!text.Equals("end")) 12 | { 13 | string pattern = @"(.*?)<\/a>"; 14 | string replacement = @"[URL href=$1]$2[/URL]"; 15 | string replaced = Regex.Replace(text, pattern, replacement); 16 | 17 | Console.WriteLine(replaced); 18 | 19 | text = Console.ReadLine(); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ReverseString/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ReverseString/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace ReverseString 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | char[] input = Console.ReadLine().ToCharArray(); 11 | 12 | Console.WriteLine(string.Join(string.Empty, input.Reverse())); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /8Strings-and-Regex/SumBigNumbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/TextFilter/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/TextFilter/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TextFilter 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | string[] bannedWords = Console.ReadLine().Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries); 10 | string text = Console.ReadLine(); 11 | 12 | foreach (string word in bannedWords) 13 | { 14 | if (text.Contains(word)) 15 | { 16 | text = text.Replace(word, new string('*', word.Length)); 17 | } 18 | } 19 | 20 | Console.WriteLine(text); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /8Strings-and-Regex/UnicodeCharacters/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/UnicodeCharacters/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace UnicodeCharacters 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | char[] input = Console.ReadLine().ToCharArray(); 11 | StringBuilder result = new StringBuilder(); 12 | 13 | foreach (char character in input) 14 | { 15 | string unicode = "\\u" + ((int)character).ToString("x4"); 16 | result.Append(unicode); 17 | } 18 | 19 | Console.WriteLine(result); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /8Strings-and-Regex/UseYourChainsBuddy/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ValidUsernames/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /8Strings-and-Regex/ValidUsernames/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.RegularExpressions; 4 | 5 | namespace ValidUsernames 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | string[] inputSplit = Console.ReadLine().Split(new char[] { ' ', '/', '\\', '(', ')' }, StringSplitOptions.RemoveEmptyEntries); 12 | string usernames = string.Join(" ", inputSplit); 13 | string pattern = @"\b[a-zA-z][a-zA-Z0-9_]{2,24}\b"; 14 | MatchCollection validUsernames = Regex.Matches(usernames, pattern); 15 | List results = new List(); 16 | 17 | int sum = 0; 18 | 19 | for (int i = 0; i < validUsernames.Count; i++) 20 | { 21 | if (i < validUsernames.Count - 1) 22 | { 23 | string firstUsername = validUsernames[i].ToString(); 24 | string secondUsername = validUsernames[i + 1].ToString(); 25 | 26 | int currentSum = firstUsername.Length + secondUsername.Length; 27 | 28 | if (currentSum > sum) 29 | { 30 | sum = currentSum; 31 | results = new List { firstUsername, secondUsername }; 32 | } 33 | } 34 | } 35 | 36 | Console.WriteLine(string.Join("\n", results)); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Exams/Exam-06th-Jan-2017/EnduranceRally/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-06th-Jan-2017/EnduranceRally/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace EnduranceRally 5 | { 6 | public class EnduranceRally 7 | { 8 | public static void Main() 9 | { 10 | string[] drivers = Console.ReadLine().Split(); 11 | double[] zones = Console.ReadLine().Split().Select(double.Parse).ToArray(); 12 | int[] checkpoints = Console.ReadLine().Split().Select(int.Parse).ToArray(); 13 | 14 | foreach (string driver in drivers) 15 | { 16 | double fuel = driver[0]; 17 | 18 | for (int i = 0; i < zones.Length; i++) 19 | { 20 | if (checkpoints.Contains(i)) 21 | { 22 | fuel += zones[i]; 23 | } 24 | else 25 | { 26 | fuel -= zones[i]; 27 | } 28 | 29 | if (fuel <= 0) 30 | { 31 | Console.WriteLine($"{driver} - reached {i}"); 32 | break; 33 | } 34 | } 35 | 36 | if (fuel <= 0) 37 | { 38 | continue; 39 | } 40 | 41 | Console.WriteLine($"{driver} - fuel left {fuel:F2}"); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Exams/Exam-06th-Jan-2017/SinoTheWalker/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-06th-Jan-2017/SinoTheWalker/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SinoTheWalker 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | DateTime leavingTime = DateTime.ParseExact(Console.ReadLine(), "HH:mm:ss", null); 10 | int steps = int.Parse(Console.ReadLine()) % 86400; 11 | int secondsPerStep = int.Parse(Console.ReadLine()) % 86400; 12 | double walkingTime = (double)steps * secondsPerStep; 13 | 14 | DateTime arrivalTime = leavingTime.AddSeconds(walkingTime); 15 | 16 | Console.WriteLine($"Time Arrival: {arrivalTime.Hour:D2}:{arrivalTime.Minute:D2}:{arrivalTime.Second:D2}"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Exams/Exam-06th-Jan-2017/SoftUniKaraoke/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-06th-Jan-2017/WinningTicket/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-11th-September-2016/Files/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-11th-September-2016/Files/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Files")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("Files")] 12 | [assembly: AssemblyCopyright("Copyright © 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("574fd445-f323-4c65-b45e-2151d94c0a29")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Exams/Exam-11th-September-2016/Portal/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-11th-September-2016/TheaThePhotographer/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-11th-September-2016/TheaThePhotographer/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TheaThePhotographer 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int picturesCount = int.Parse(Console.ReadLine()); 10 | int filterTimePerPic = int.Parse(Console.ReadLine()); 11 | int filterFactor = int.Parse(Console.ReadLine()); 12 | int uploadTimePerPic = int.Parse(Console.ReadLine()); 13 | 14 | double filteredPics = Math.Ceiling(picturesCount * ((double)filterFactor / 100)); 15 | long filterTime = (long)picturesCount * filterTimePerPic; 16 | long uploadTime = (long)filteredPics * uploadTimePerPic; 17 | long totalTime = filterTime + uploadTime; 18 | 19 | TimeSpan resultTime = TimeSpan.FromSeconds(totalTime); 20 | 21 | Console.WriteLine($"{resultTime.Days:D1}:{resultTime.Hours:D2}:{resultTime.Minutes:D2}:{resultTime.Seconds:D2}"); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Exams/Exam-11th-September-2016/TrophonTheGrumpyCat/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-12th-June-2016/FootballLeague/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-12th-June-2016/Numbers/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-12th-June-2016/Numbers/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Numbers 6 | { 7 | public class Launcher 8 | { 9 | public static void Main() 10 | { 11 | int[] inputArr = Console.ReadLine().Split().Select(int.Parse).ToArray(); 12 | double avg = inputArr.Average(); 13 | List result = inputArr.Where(n => n > avg).OrderByDescending(n => n).Take(5).ToList(); 14 | 15 | if (result.Count == 0) 16 | { 17 | Console.WriteLine("No"); 18 | } 19 | else 20 | { 21 | Console.WriteLine(string.Join(" ", result)); 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Exams/Exam-12th-June-2016/SoftuniCoffeeOrders/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-12th-June-2016/SoftuniCoffeeOrders/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SoftuniCoffeeOrders 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int ordersCount = int.Parse(Console.ReadLine()); 10 | decimal total = 0; 11 | 12 | for (int i = 0; i < ordersCount; i++) 13 | { 14 | decimal capsulePrice = decimal.Parse(Console.ReadLine()); 15 | DateTime date = DateTime.ParseExact(Console.ReadLine(), "d/M/yyyy", null); 16 | uint capsulesCount = uint.Parse(Console.ReadLine()); 17 | 18 | int daysInMonth = DateTime.DaysInMonth(date.Year, date.Month); 19 | decimal coffeePrice = daysInMonth * capsulesCount * capsulePrice; 20 | 21 | Console.WriteLine($"The price for the coffee is: ${coffeePrice:F2}"); 22 | total += coffeePrice; 23 | } 24 | 25 | Console.WriteLine($"Total: ${total:F2}"); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Exams/Exam-12th-June-2016/TrifonsQuest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-23rd-October-2016/CharityMarathon/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-23rd-October-2016/CharityMarathon/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CharityMarathon 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int marathonLength = int.Parse(Console.ReadLine()); 10 | int runnersCount = int.Parse(Console.ReadLine()); 11 | int avgLaps = int.Parse(Console.ReadLine()); 12 | int lapLength = int.Parse(Console.ReadLine()); 13 | int trackCapacity = int.Parse(Console.ReadLine()); 14 | decimal moneyPerKm = decimal.Parse(Console.ReadLine()); 15 | 16 | int maximumRunners = trackCapacity * marathonLength; 17 | 18 | if (runnersCount > maximumRunners) 19 | { 20 | runnersCount = maximumRunners; 21 | } 22 | 23 | long totalMeters = (long)runnersCount * avgLaps * lapLength; 24 | long totalKms = totalMeters / 1000; 25 | decimal moneyRaised = totalKms * moneyPerKm; 26 | 27 | Console.WriteLine($"Money raised: {moneyRaised:F2}"); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Exams/Exam-23rd-October-2016/Ladybugs/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-23rd-October-2016/NetherRealms/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-23rd-October-2016/RoliTheCoder/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-26th-February-2017/HornetArmada/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-26th-February-2017/HornetAssault/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-26th-February-2017/HornetComm/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-26th-February-2017/HornetWings/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-26th-February-2017/HornetWings/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace HornetWings 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int wingFlaps = int.Parse(Console.ReadLine()); 10 | double distanceFor1000Flaps = double.Parse(Console.ReadLine()); 11 | int endurance = int.Parse(Console.ReadLine()); 12 | 13 | double distanceTraveled = (wingFlaps / 1000.0) * distanceFor1000Flaps; 14 | int time = (wingFlaps / 100) + ((wingFlaps / endurance) * 5); 15 | 16 | Console.WriteLine($"{distanceTraveled:F2} m."); 17 | Console.WriteLine($"{time} s."); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Exams/Exam-Preparation-I-Feb-2017/EnduranceRally/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-Preparation-I-Feb-2017/EnduranceRally/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace EnduranceRally 5 | { 6 | public class Launcher 7 | { 8 | public static void Main() 9 | { 10 | string[] drivers = Console.ReadLine().Split(); 11 | double[] zones = Console.ReadLine().Split().Select(double.Parse).ToArray(); 12 | int[] checkPoints = Console.ReadLine().Split().Select(int.Parse).ToArray(); 13 | 14 | foreach (string driver in drivers) 15 | { 16 | double initialFuel = driver[0]; 17 | 18 | for (int j = 0; j < zones.Length; j++) 19 | { 20 | if (checkPoints.Contains(j)) 21 | { 22 | initialFuel += zones[j]; 23 | } 24 | else 25 | { 26 | initialFuel -= zones[j]; 27 | } 28 | 29 | if (initialFuel <= 0) 30 | { 31 | Console.WriteLine($"{driver} - reached {j}"); 32 | break; 33 | } 34 | } 35 | 36 | if (initialFuel <= 0) 37 | { 38 | continue; 39 | } 40 | 41 | Console.WriteLine($"{driver} - fuel left {initialFuel:F2}"); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Exams/Exam-Preparation-I-Feb-2017/SinoTheWalker/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-Preparation-I-Feb-2017/SinoTheWalker/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SinoTheWalker 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | DateTime leavingTime = DateTime.ParseExact(Console.ReadLine(), "HH:mm:ss", null); 10 | int stepsCount = int.Parse(Console.ReadLine()); 11 | int timePerStep = int.Parse(Console.ReadLine()); 12 | 13 | long walkingTime = (stepsCount % 86400) * (timePerStep % 86400); 14 | DateTime arrivalTime = leavingTime.AddSeconds(walkingTime); 15 | 16 | Console.WriteLine($"Time Arrival: {arrivalTime.Hour:D2}:{arrivalTime.Minute:D2}:{arrivalTime.Second:D2}"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Exams/Exam-Preparation-I-Feb-2017/SoftUniKaraoke/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Exam-Preparation-I-Feb-2017/WinningTicket/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-June-2016/ArrayModifier/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-June-2016/PopulationAggregation/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-June-2016/SweetDessert/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-June-2016/SweetDessert/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SweetDessert 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | decimal cash = decimal.Parse(Console.ReadLine()); 10 | int guestsCount = int.Parse(Console.ReadLine()); 11 | decimal bananaPrice = decimal.Parse(Console.ReadLine()); 12 | decimal eggPrice = decimal.Parse(Console.ReadLine()); 13 | decimal berriesPriceKilo = decimal.Parse(Console.ReadLine()); 14 | 15 | decimal setsOfPortions = Math.Ceiling((decimal)guestsCount / 6); 16 | decimal moneyRequired = (setsOfPortions * 2 * bananaPrice) + (setsOfPortions * 4 * eggPrice) + (setsOfPortions * (0.2M * berriesPriceKilo)); 17 | 18 | if (cash >= moneyRequired) 19 | { 20 | Console.WriteLine("Ivancho has enough money - it would cost {0:F2}lv.", moneyRequired); 21 | } 22 | else 23 | { 24 | Console.WriteLine("Ivancho will have to withdraw money - he will need {0:F2}lv more.", moneyRequired - cash); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-June-2016/TargetMultiplier/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-October-2016/CommandInterpreter/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-October-2016/Files/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-October-2016/RageQuit/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-October-2016/SoftuniCoffeeOrders/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-I-October-2016/SoftuniCoffeeOrders/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SoftuniCoffeeOrders 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | int ordersCount = int.Parse(Console.ReadLine()); 10 | decimal totalPrice = 0; 11 | 12 | for (int i = 0; i < ordersCount; i++) 13 | { 14 | decimal pricePerCapsule = decimal.Parse(Console.ReadLine()); 15 | DateTime orderDate = DateTime.ParseExact(Console.ReadLine(), "d/M/yyyy", null); 16 | uint capsulesCount = uint.Parse(Console.ReadLine()); 17 | 18 | int days = DateTime.DaysInMonth(orderDate.Year, orderDate.Month); 19 | decimal currentOrderPrice = days * capsulesCount * pricePerCapsule; 20 | 21 | Console.WriteLine($"The price for the coffee is: ${currentOrderPrice:F2}"); 22 | totalPrice += currentOrderPrice; 23 | } 24 | 25 | Console.WriteLine($"Total: ${totalPrice:F2}"); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-June-2016/MatrixOperator/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-June-2016/SoftUniAirline/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-June-2016/SoftUniAirline/img/softuniLogo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaydov/Softuni-Programming-Fundamentals/f7e0c1a14dae2962ae1276e8d57c9ccd0578b629/Exams/Sample-Exam-II-June-2016/SoftUniAirline/img/softuniLogo.PNG -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-June-2016/SoftUniCoffeeSupplies/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-June-2016/SoftUniWaterSupplies/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-October-2016/ArrayManipulator/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-October-2016/CubicMessages/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-October-2016/FootballLeague/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-October-2016/SweetDessert/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Exams/Sample-Exam-II-October-2016/SweetDessert/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SweetDessert 4 | { 5 | public class Launcher 6 | { 7 | public static void Main() 8 | { 9 | decimal cash = decimal.Parse(Console.ReadLine()); 10 | int guests = int.Parse(Console.ReadLine()); 11 | decimal bananaPrice = decimal.Parse(Console.ReadLine()); 12 | decimal eggPrice = decimal.Parse(Console.ReadLine()); 13 | decimal berriesKiloPrice = decimal.Parse(Console.ReadLine()); 14 | 15 | double sets = Math.Ceiling(guests / 6.0); 16 | 17 | decimal productsCost = ((decimal)sets * 2 * bananaPrice) + ((decimal)sets * 4 * eggPrice) + ((decimal)(sets * 0.2) * berriesKiloPrice); 18 | 19 | if (cash >= productsCost) 20 | { 21 | Console.WriteLine($"Ivancho has enough money - it would cost {productsCost:F2}lv."); 22 | } 23 | else 24 | { 25 | Console.WriteLine($"Ivancho will have to withdraw money - he will need {productsCost - cash:F2}lv more."); 26 | } 27 | } 28 | } 29 | } 30 | --------------------------------------------------------------------------------