using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication17
{
class First
{
public void prindata(double r)
{
double area;
area = 3.14 * r * r;
Console.WriteLine("Circle Area : " + area);
}
public void printdata(int l, int b)
{
long area;
area = l*b;
Console.WriteLine("Rectangle Area : " + area);
}
public void printdata(long l, long b, long h)
{
long area;
area = l*b*h;
Console.WriteLine("Cuboid Area : " + area);
}
}
class Program
{
static void Main(string[] args)
{
First a= new First();
a.prindata(10);
a.printdata(5,2);
a.printdata(5, 2, 5);
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication17
{
class First
{
public void prindata(double r)
{
double area;
area = 3.14 * r * r;
Console.WriteLine("Circle Area : " + area);
}
public void printdata(int l, int b)
{
long area;
area = l*b;
Console.WriteLine("Rectangle Area : " + area);
}
public void printdata(long l, long b, long h)
{
long area;
area = l*b*h;
Console.WriteLine("Cuboid Area : " + area);
}
}
class Program
{
static void Main(string[] args)
{
First a= new First();
a.prindata(10);
a.printdata(5,2);
a.printdata(5, 2, 5);
Console.ReadKey();
}
}
}
No comments:
Post a Comment