Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace convertingfloat
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = 100;
- float f; //float express decimal values
- //so we can assign integer to float
- //but we can not assign float to integer coz decimal problem
- f = a; //we assigned a (integer) to f (float)
- Console.WriteLine(f); //output will be 100
- Console.ReadKey();
- //float express decimal values
- }
- }
- }
Add Comment
Please, Sign In to add comment