Example #1
0
        static void Main(string[] args)
        {
            var firstName = RequestData.GetAString("What is your first name: ");

            UserMessages.ApplicationStartMessage(firstName);

            var x = RequestData.GetADouble("Enter your first number: ");
            var y = RequestData.GetADouble("Enter your second number: ");

            var result = CalculateData.Add(x, y);

            UserMessages.PrintResultMessage($"The sum of { x } and { y } is { result }");

            Console.ReadLine();
        }
Example #2
0
        static void Main(string[] args)
        {
            // This is a simple calculator.
            // The focus of this program is to show I understand the basics of using
            // static classes.

            UserMessages.WelcomeMessage();

            double num1    = RequestData.GetADouble("Enter your first number: ");
            string operand = RequestData.GetAString("Enter operand you would like to use: ");
            double num2    = RequestData.GetADouble("Enter your second number: ");

            var result = CalculateData.Calculation(num1, operand, num2);

            UserMessages.PrintResultMessage($"Result of { num1 } { operand } { num2 } = { result }");

            UserMessages.GoodByeMessage();

            Console.ReadLine();
        }