Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace RoundToEven {
- class Program {
- static void Main(string[] args) {
- double[] numbers = { 12.5000, 12.45, 12.4, 12.6, 12.55 };
- foreach (var number in numbers) {
- Console.WriteLine("{0} \t wird zu {1}!", number, Math.Round(number, MidpointRounding.ToEven));
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement