Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ex_dbl
- {
- class Program
- {
- static void Main(string[] args)
- {
- double x = 15 / 4;
- Console.WriteLine("x = " + x);
- //Printed "x = 3"
- x = 15.0 / 4;
- Console.WriteLine("x = " + x);
- //Printed "x = 3.75"
- x = 15 / 4.0;
- Console.WriteLine("x = " + x);
- //Printed "x = 3.75"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement