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:
3
challenges/acronyms/solutions/cs/function/README.md
Normal file
3
challenges/acronyms/solutions/cs/function/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# acronyms/cs/function
|
||||
|
||||
Created by [@Divlo](https://github.com/Divlo) on 5 September 2021.
|
19
challenges/acronyms/solutions/cs/function/Solution.cs
Normal file
19
challenges/acronyms/solutions/cs/function/Solution.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user