1.) Write a program in C# using command line arguments to display a welcome message. The message has to be supplied as input in the command line
using System;
class prac1
{
public static void Main(string[] args)
{
foreach(string k in args)
{
Console.Write(k+" ");
}
Console.ReadLine();
}
}
2.) Write a program in C# to find the area of a circle, given its radius.
using System;
class prac2
{
public static void Main()
{
float radius=8.9f;
float pi=3.14f;
float area;
area=pi*radius*radius;
Console.WriteLine("The Area Of Circle whose Radius is {0} :- {1}",radius,area);
Console.ReadLine();
}
}
using System;
class prac1
{
public static void Main(string[] args)
{
foreach(string k in args)
{
Console.Write(k+" ");
}
Console.ReadLine();
}
}
2.) Write a program in C# to find the area of a circle, given its radius.
using System;
class prac2
{
public static void Main()
{
float radius=8.9f;
float pi=3.14f;
float area;
area=pi*radius*radius;
Console.WriteLine("The Area Of Circle whose Radius is {0} :- {1}",radius,area);
Console.ReadLine();
}
}