© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
13 replies
Lilac

C# Cyclic Numbers Array Check Help

I'm doing a homework for my Programming Fundamentals subject, which requires me to enter N numbers into array A, tell if array A is cyclic?
This is my progress so far:
namespace _1_Dimensional_Array
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //formating
            Console.OutputEncoding = System.Text.Encoding.Unicode;

            //Request User Input             
            Console.Write("Enter the amount of elements of your array: "); //Determine the amount of numbers in this Array
            //Process unwanted inputs
            int how_much;
            while (true)
            {
                if (int.TryParse(Console.ReadLine(), out how_much))
                {
                    break;
                }
                else
                {
                    Console.Write("Enter the amount of elements of your array: ");
                }
            }

            // using Arrays
            int[] numbers = new int[how_much]; //create an array based on the user request

            // use loops

            for (int i = 0; i < numbers.Length; i++)
            {
                //Store all answers
                Console.Write($"Give me the {i} element of Array A: ");
                int element_number = Convert.ToInt32(Console.ReadLine());
            }



            Console.ReadKey();
        }
    }
}
namespace _1_Dimensional_Array
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //formating
            Console.OutputEncoding = System.Text.Encoding.Unicode;

            //Request User Input             
            Console.Write("Enter the amount of elements of your array: "); //Determine the amount of numbers in this Array
            //Process unwanted inputs
            int how_much;
            while (true)
            {
                if (int.TryParse(Console.ReadLine(), out how_much))
                {
                    break;
                }
                else
                {
                    Console.Write("Enter the amount of elements of your array: ");
                }
            }

            // using Arrays
            int[] numbers = new int[how_much]; //create an array based on the user request

            // use loops

            for (int i = 0; i < numbers.Length; i++)
            {
                //Store all answers
                Console.Write($"Give me the {i} element of Array A: ");
                int element_number = Convert.ToInt32(Console.ReadLine());
            }



            Console.ReadKey();
        }
    }
}
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

✅ Array help C++
C#CC# / help
2y ago
C# .Net Core WebAPI Cyclic Dependancy
C#CC# / help
2y ago
C# array init
C#CC# / help
2y ago
❔ Backpack Array / C#
C#CC# / help
3y ago