Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace zad5lancuchy
- {
- class Program
- {
- static void Main(string[] args)
- {
- string s1 = "To jest tekst oryginalny ktory nalezy zamienic na tzw format CamelCase";
- string[] tab1 = s1.Split(' ');
- string[] tab3 = new string[tab1.Length];
- for (int i = 0; i < tab1.Length; i++)
- {
- char[] tab2 = tab1[i].ToCharArray();
- tab2[0] = Char.ToUpper(tab2[0]);
- string s2 = new string(tab2);
- tab3[i] = s2;
- }
- string s3 = string.Join(" ", tab3);
- Console.WriteLine(s1);
- Console.WriteLine(s3);
- string s4 = s3.Replace(" ","");
- Console.WriteLine(s4);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement