Debugging a basic C# calculator
Posted by Gizmosis350k
Last Updated: March 24, 2012
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ch03Ex2
{
    class Program
    {
        static void Main(string[] args)
        {
            double firstNumber, secondNumber;
            string userName;
            Console.WriteLine("Enter your name:");
            Console.ReadLine();
            userName = Console.ReadLine();
            Console.WriteLine("Welcome {0}!", userName);
            Console.ReadKey();
            // Something is broken here rofl
            Console.WriteLine ("Now give me a number:");
            firstNumber = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Now give me another number:");
            secondNumber = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine ("The sum of {0} and {1} is {2}.", firstNumber, secondNumber, firstNumber + secondNumber);
            Console.WriteLine ("The result of multiplying {0} by {1} is {2}.", firstNumber, secondNumber, firstNumber * secondNumber);
            Console.WriteLine ("Subtracting {0} from {1} gives you {2}.", firstNumber, secondNumber, firstNumber - secondNumber);
            Console.WriteLine ("If we divide {0} by {1} we get {2}.", firstNumber, secondNumber, firstNumber / secondNumber);
            Console.WriteLine("The remainder left from dividing {0} by {1} is {2}.", firstNumber, secondNumber, firstNumber % secondNumber);
            Console.WriteLine("This program is partially broken lol");
            Console.ReadKey();        
        }
    }
}


Something is causing the console to malfunction when i enter my name, what could be causing it?
Related Content
Simple Calculator using C#
Simple Calculator using C#
Samath | Dec 30, 2020
Calculator Program in Java
Calculator Program in Java
Samath | Jan 07, 2021
Simple C++ Calculator
Simple C++ Calculator
Samath | Jan 05, 2017
Simple Calculator using Python
Simple Calculator using Python
Samath | Jan 09, 2017
GPA Calculator using C#
GPA Calculator using C#
Samath | Jan 01, 2021
Simple GPA calculator in Java
Simple GPA calculator in Java
Samath | Jan 17, 2024
GPA Calculator in C++
GPA Calculator in C++
Samath | Jan 17, 2024
GPA Calculator using Python
GPA Calculator using Python
Samath | Jan 20, 2024
Scientific Calculator using C#
Scientific Calculator using C#
Samath | Jan 08, 2021