public int sum(int a, int b){
public string osszvon(int a, int b){
return Convert.ToString(a)+Convert.ToString(b);
public string dobas(int a, int b){
return Convert.ToString(a)+","+ Convert.ToString(b);
public Object tombi(Object[] tomb){
return tomb[0]+", "+tomb[1];
public Object muveletek(int[] tomb)
for (int i = 0; i < tomb.Length; i++)
atlag = (double)osszeg / tomb.Length;
return "Átlag: "+Convert.ToString(atlag).Substring(0,5)+"\n15-ösből hány darab van: "+db;
static void Main(string[] args)
function f = new function();
Console.WriteLine("Az eredmény: "+f.sum(1, 2));
Console.WriteLine("Összevonva a két szám: "+f.osszvon(1, 2));
Console.WriteLine("Két dobás eredménye: "+f.dobas(a, b));
Object[] tomb = {"Józsi", 14};
Console.WriteLine(f.tombi(tomb));
int[] tomb2 = {15,16,17,18,19,20,15,16,15,43,23,98,15};
Console.WriteLine(f.muveletek(tomb2));
public int sum(int a, int b){
public string osszvon(int a, int b){
return Convert.ToString(a)+Convert.ToString(b);
public string dobas(int a, int b){
return Convert.ToString(a)+","+ Convert.ToString(b);
public Object tombi(Object[] tomb){
return tomb[0]+", "+tomb[1];
public Object muveletek(int[] tomb)
for (int i = 0; i < tomb.Length; i++)
atlag = (double)osszeg / tomb.Length;
return "Átlag: "+Convert.ToString(atlag).Substring(0,5)+"\n15-ösből hány darab van: "+db;
public static void Main()
function f = new function();
Console.WriteLine("Az eredmény: "+f.sum(1, 2));
Console.WriteLine("Összevonva a két szám: "+f.osszvon(1, 2));
Console.WriteLine("Két dobás eredménye: "+f.dobas(a, b));
Object[] tomb = {"Józsi", 14};
Console.WriteLine(f.tombi(tomb));
int[] tomb2 = {15,16,17,18,19,20,15,16,15,43,23,98,15};