Ad

for loop

public class Program {
  public static int loop(int repeat){
    int result = 0;
    for(String s = ""; s.length() < repeat; s += " ") {
      result = s.length();
    }
    return Integer.parseInt(new Integer(result).toString().trim());
  }
}

Somebody optimize my not so great code.

using System.Linq;

public class Program{
  public static int ToInt(string s){
    int result = 0;
    foreach(char c in s){
      result *= 10;
      result += "abcdefghijklmnopqrstuvwxyz".IndexOf(c)+1;
    }
    return result;
  }
}

This is totally a very complex program.

public class TwoDimensionalArray{
  public static T[,] MakeArray<T>(){
    return new T[0,0];
  } 
}
public class Program
{
    public static int GetValue(int i)
    {
      return i;
    }
}