© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
5 replies
chief

❔ My Input of the User Isn't Staying on the Same Line

Basically my user input keeps going one line below, which throws off the symbol of input I made, as seen below


My code can be found below;

namespace Calculator
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the C# version of the calculator!");

            Console.WriteLine("What would you like to do? \n1 = Addition\n2 = Subtraction\n3 = Multiplication\n4 = Division\n -> ");
            int operator_choice = Convert.ToInt32(Console.ReadLine());

            if (operator_choice == 1)
            {
                Console.WriteLine("What is your first number? \n -> ");
                int firstNumber = Convert.ToInt32(Console.ReadLine());

            }

        }
    }
}
namespace Calculator
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the C# version of the calculator!");

            Console.WriteLine("What would you like to do? \n1 = Addition\n2 = Subtraction\n3 = Multiplication\n4 = Division\n -> ");
            int operator_choice = Convert.ToInt32(Console.ReadLine());

            if (operator_choice == 1)
            {
                Console.WriteLine("What is your first number? \n -> ");
                int firstNumber = Convert.ToInt32(Console.ReadLine());

            }

        }
    }
}
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ how do i make user input date in the same line
C#CC# / help
2y ago
❔ Why isn't one of my Identity user field being updated?
C#CC# / help
3y ago
✅ User input
C#CC# / help
3y ago