-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCopyArray.cs
34 lines (30 loc) · 854 Bytes
/
CopyArray.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1.Dec20
{
class CopyArray
{
static void Main(string[] args)
{
Console.WriteLine("Enter the size of array: ");
int size = int.Parse(Console.ReadLine());
int[] a = new int[size];
int[] b = new int[size];
Console.WriteLine("Element in Array:");
for(int i = 0; i < a.Length; i++)
{
a[i] = int.Parse(Console.ReadLine());
b[i] = a[i];
}
Console.WriteLine("New Array is........");
for(int i = 0; i < b.Length; i++)
{
Console.WriteLine(b[i]+" ");
Console.ReadLine();
}
}
}
}