fork download
  1. namespace Problem_12.Number_checker
  2. {
  3. using System;
  4.  
  5. public class Program
  6. {
  7. public static void Main()
  8. {
  9. var input = Console.ReadLine();
  10.  
  11. double numberStorage;
  12. if(double.TryParse(input, out numberStorage))
  13. {
  14. Console.WriteLine("It is a number.");
  15. }
  16.  
  17. else
  18. {
  19. Console.WriteLine("Invalid input!");
  20. }
  21. }
  22. }
  23. }
Success #stdin #stdout 0s 131648KB
stdin
Standard input is empty
stdout
Invalid input!