5 questions;
1. Why 34? string str = "012345" str = str.Substring(0); str = str.Substring(2); str = str.Substring(0,3); str = str.Substring(1,2); Console.Write(str); 2. Why 120? int foo = 1; for(int x = 5; x <= 50; x++) { foo *= x; for(int y = 1; y <= 5; y++) { if(x == y) goto bar; foo *= y; } } bar: Console.Write(foo); 3. Why 2? for(int i = 1; i < 5; i++) { if(i == 2) { Console.Write(i); if(i % 2 == 1) Console.Write(i); break; Console.Write(i); continue; } } 4. Why 4? static int sm(ref int a, ref double A) { --a; --A; if(a.GetType()==typeof(int)) return (int) A; return a; } static void Main(string[] args) { int A = 5; double a =-1.4; A = sm(ref A, ref a); Console.Write(Math.Abs(Math.Ceiling(A+a))); } 5. Why abab instead of baba? static void Main(string[] args) { string str = "abab"; change(str); Console.Write(str); } static void change(string s) { s = "baba"; }