SHARE
TWEET

Untitled

a guest Aug 20th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ex_dbl
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double x = 15 / 4;
  10.             Console.WriteLine("x = " + x);
  11.             //Printed "x = 3"
  12.  
  13.             x = 15.0 / 4;
  14.             Console.WriteLine("x = " + x);
  15.             //Printed "x = 3.75"
  16.  
  17.             x = 15 / 4.0;
  18.             Console.WriteLine("x = " + x);
  19.             //Printed "x = 3.75"
  20.         }
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top