//Value Type Paramete Used C#.net
using System;
namespace ValueType
{
class Program
{
public static int qube(int num)
{
return num * num * num;
}
static void Main(string[] args)
{
int val,number;
number = 5;
//Passing the copy value of number variable
val = Program.qube(number);
Console.Write(val);
Console.ReadLine();
}
}
}
O/P:= 125
using System;
namespace ValueType
{
class Program
{
public static int qube(int num)
{
return num * num * num;
}
static void Main(string[] args)
{
int val,number;
number = 5;
//Passing the copy value of number variable
val = Program.qube(number);
Console.Write(val);
Console.ReadLine();
}
}
}
O/P:= 125
No comments:
Post a Comment