Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
using System.IO;
using System;
class MyApp
{
public int ArraySum (params int[] arr)
{
int sum=0;
foreach (int i in arr)
{
sum+=i;
}
return sum;
}
}
class Execute
{
static void Main()
{
MyApp app = new MyApp();
int sum;
int [] balance = {200,43,12,77,89};
sum=app.ArraySum(balance);
Console.WriteLine("Sum is {0}",sum);
}
}
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more