Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ArraysandMethods
- {
- class Program
- {
- static void Main(string[] args)
- {
- {
- //Declarations
- int[] numberlist = new int[11];
- double[] doublelist = new double[11];
- Array.Copy(numberlist, doublelist, numberlist.Length);
- int length = numberlist.GetLength(0);
- const int end = 0;
- int count = 0;
- Console.Write(" Enter 10 numbers to convert to double n PRESS 0 TO ENDn ");
- Console.Write("____________________________________________________________nn");
- do
- {
- //get user input
- for (int i = 1; i < numberlist.Length; i++)
- {
- Console.Write("| Enter next number: ");
- numberlist[i] = Convert.ToInt32(Console.ReadLine());
- }
- Console.Write(" Results:n");
- Console.Write("n____________________________________________________________nn");
- //print array
- for (int i = 1; i < numberlist.Length; i++)
- {
- Console.WriteLine($"Number at index ({i}) = {numberlist[i]} ");
- }
- Console.ReadKey();
- } while (count != end);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment