Advertisement
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;
- class MoonGravity
- {
- static void Main()
- {
- double weightToCalc;
- Console.WriteLine("Please, enter the man weight in kilos:");
- while(!double.TryParse(Console.ReadLine(), out weightToCalc))
- {
- Console.WriteLine("\nPlease, enter correct weight.\n");
- }
- Console.WriteLine("A man weighting {0} kilos will weight {1} in Moon Gravity", weightToCalc, (weightToCalc*0.17));
- Console.WriteLine("\nPress any key to exit.");
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement