Main.cs
using
System;
class
One {
-
public
int
Sum(
int
[] arg) {
-
int
res=0;
-
for
(
int
i=0; i<arg.Length; i++) {
-
res+=arg[i];
-
}
-
return
res;
-
}
}
class
Program {
-
public
static
int
Main() {
-
int
[] arra =
new
int
[] {1, 2, 3, 4, 5, 6, 7, 8, 9};
-
One O =
new
One();
-
Console.WriteLine(O.Sum(arra));
-
Console.ReadKey();
-
return
0;
-
}
}
using
System;
class
One {
-
public
int
Sum(
int
[] arg) {
-
int
res=0;
-
for
(
int
i=0; i<arg.Length; i++) {
-
res+=arg[i];
-
}
-
return
res;
-
}
}
class
Program {
-
public
static
int
Main() {
-
int
[] arra =
new
int
[] {1, 2, 3, 4, 5, 6, 7, 8, 9};
-
One O =
new
One();
-
Console.WriteLine(O.Sum(arra));
-
Console.ReadKey();
-
return
0;
-
}
}
45