Task

Express a number in decimal as a fixed-length string with leading zeros.



For example, the number   7.125   could be expressed as   00007.125.




 
class Program
    {
 
 
        static void Main(string[] args)
        {
 
            float myNumbers = 7.125F;
 
            string strnumber = Convert.ToString(myNumbers);
 
            Console.WriteLine(strnumber.PadLeft(9, '0'));
 
            Console.ReadLine();
        }
 
 
 
 
    }
 