1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2025-05-18 12:02:53 +02:00

feat(solutions): add acronyms/cs/function

This commit is contained in:
Divlo
2021-09-05 10:54:20 +02:00
parent d934d6e7c2
commit 552277f22d
17 changed files with 353 additions and 337 deletions

View File

@ -0,0 +1,3 @@
# acronyms/cs/function
Created by [@Divlo](https://github.com/Divlo) on 5 September 2021.

View File

@ -0,0 +1,19 @@
using System;
namespace Solution
{
class Program
{
static void Main()
{
string line = Console.ReadLine();
string[] words = line.Replace("\"", "").Split(' ');
string result = "";
foreach (string word in words)
{
result += word[0].ToString().ToUpper();
}
Console.WriteLine(result);
}
}
}

View File

@ -1,15 +1,17 @@
using System;
namespace Solution
{
class Program
{
static void Main()
class Program
{
string line;
while ((line = System.Console.ReadLine()) != null)
{
static void Main()
{
string line;
while ((line = Console.ReadLine()) != null)
{
System.Console.WriteLine($"Hello, {line}!");
}
Console.WriteLine($"Hello, {line}!");
}
}
}
}
}

View File

@ -1,6 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>