Advertisement
adriyanbulgary

PrimitiveDataTypesAndVariablesC#

May 29th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. using System;
  2. /*
  3.  * Which of the following values can be assigned to a variable of type float and which to a variable of type
  4.  * double: 34.567839023, 12.345, 8923.1234857, 3456.091
  5.  */
  6. class FloatAndDoubleVariables
  7. {
  8.     static void Main()
  9.     {
  10.         double a = 34.567839023;
  11.         float b = 12.345f;
  12.         double c = 8923.1234857;
  13.         float d = 3456.091f;
  14.         Console.WriteLine(" float numbers -> {0} and {1}\n double  numbers -> {2} and {3}", b, d, a, c);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement