Advertisement
mzografski

MoonGavity

Mar 15th, 2014
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 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. class MoonGravity
  8. {
  9.     static void Main()
  10.     {
  11.         double weightToCalc;
  12.         Console.WriteLine("Please, enter the man weight in kilos:");
  13.         while(!double.TryParse(Console.ReadLine(), out weightToCalc))
  14.         {
  15.             Console.WriteLine("\nPlease, enter correct weight.\n");            
  16.         }
  17.         Console.WriteLine("A man weighting {0} kilos will weight {1} in Moon Gravity", weightToCalc, (weightToCalc*0.17));
  18.         Console.WriteLine("\nPress any key to exit.");
  19.         Console.ReadKey();
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement