hi every body
please hlep me how to give int/float values through keyboard
Printable View
hi every body
please hlep me how to give int/float values through keyboard
you have to get a string input using:
System.Console.ReadLine()
and then convert it into int/float using:
Int32.Parse(string)
System.Console.ReadLine() used for reading the inputs. Default all the inputs are treated as string. I you want u can convert the input like float.Parsefloat() and format the input.
Regards,
Dharma