Assignment 1
Assignment 1
array.
Test Data :
Input the number of elements to be stored in the array :3
Input 3 elements in the array :
element - 0 : 15
element - 1 : 10
element - 2 : 12
Expected Output:
The elements stored in the first array are :
15 10 12
The elements copied into the second array are :
15 10 12
Program.cs
using System;
namespace Task2
{
class Program
{
static void Main(string[] args)
{
}
}
}
MethodOverloading.cs
using System;
using System.Collections.Generic;
using System.Text;
namespace Task2
{
class MethodOverloading
{
public int add(int a, int b) //two int type Parameters method
{
return a + b;
}
public int add(int a, int b, int c) //Three parameters with same method same
as above
{
return a + b + c;
}
public int add(int a, int b, int c, int d) //four Parameters with same method
same as above two method
{
return a + b + c + d;
}
}
}
using System;