int i = 3; double answer = 1; while (i < upperValueAsFloat) { answer = answer - (1/i); i = i+2; } Console.WriteLine("Answer: " + answer); // This should probably be cout or something in C