using System.Collections.Concurrent;
using System.Collections.Generic;
public static void Main()
Console.WriteLine("Piso mas alto de donde no se rompen los huevos = "+LanzamientoDehuevo(100));
Console.WriteLine(ReverseWord("Hola"));
Console.WriteLine(ReverseWord("Quiero hacer parte de RobinFood"));
Console.WriteLine("["+String.Join(",", WaveWord("robinfood").ToArray())+"]");
public static int LanzamientoDehuevo(int total_pisos) {
int contaddordehuevosrotos = 0;
for(int piso = 100; piso >= 1 && contaddordehuevosrotos < 2; piso--) {
Random r = new Random(piso*DateTime.Now.GetHashCode() * System.Threading.Thread.CurrentThread.ManagedThreadId * (int)(Math.PI* 1000000));
contaddordehuevosrotos++;
public static string ReverseWord(string word){
if(string.IsNullOrEmpty(word)){
int halflength = word.Length / 2;
char[] array = word.ToCharArray();
int last_index = word.Length -1;
for(int index= 0; index < halflength; index++,last_index-- ){
array[last_index] = word[index];
array[index] = word[last_index];
resultado = new String(array);
public static string[] WaveWord(string word){
if(string.IsNullOrEmpty(word)){
return new string[]{ ""};
string[] resultado = new string[word.Length*2];
for(int index= 0; index >=0 &&index_result < resultado.Length ; index_result++, index = index +=acumulator){
var chararray = word.ToCharArray();
chararray[index] = Char.ToUpper(chararray[index]);
resultado[index_result] = new string(chararray);
if(index == word.Length -1 ){