1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00

feat(solutions): add camel-case/cs/function

This commit is contained in:
Divlo 2021-09-08 19:17:59 +02:00
parent 3f5c0fe276
commit ef084b6bfe
No known key found for this signature in database
GPG Key ID: 6F24DA54DA3967CF
2 changed files with 22 additions and 0 deletions

View File

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

View File

@ -0,0 +1,19 @@
using System;
namespace Solution
{
class Program
{
static void Main()
{
string[] words = Console.ReadLine().ToLower().Trim().Split(" ");
string result = words[0];
for (int index = 1; index < words.Length; index++)
{
var word = words[index];
result += word[0].ToString().ToUpper() + word.Substring(1);
}
Console.WriteLine(result);
}
}
}