Guest User

Untitled

a guest
Jul 15th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace convertingfloat
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. int a = 100;
  15. float f; //float express decimal values
  16. //so we can assign integer to float
  17. //but we can not assign float to integer coz decimal problem
  18. f = a; //we assigned a (integer) to f (float)
  19.  
  20. Console.WriteLine(f); //output will be 100
  21. Console.ReadKey();
  22.  
  23. //float express decimal values
  24.  
  25.  
  26.  
  27.  
  28. }
  29. }
  30. }
Add Comment
Please, Sign In to add comment