Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1/2 = 0.5
- 0.5 / 2 = 0.25
- static void Main(string[] args)
- {
- int i = 0;
- decimal x = 1m;
- decimal dividir = x / 2m;
- do
- {
- i++;
- Console.WriteLine("{0}:{1}", i, dividir);
- dividir = dividir / 2m;
- } while (dividir != 0);
- Console.ReadKey();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement