You are on page 1of 2

Greet

syntax

using System;
namespace Greet
{
class Intro
{
static void Main(string[] args)
{

Intro obj = new Intro();


obj.Greet("Ericka Jannelle", "Oriel");

}
public void Greet()
{
Console.WriteLine("Hello gorgeous, Good Morning!");
}
public void Greet(string firstName, string lastName)
{
Console.WriteLine("Hello gorgeous, Good Morning!! {0}, {1}", firstName, lastName);
}
}
}

Output

Price
Syntax
using System;

namespace Compute
{
class Numbers
{
static void Main(string[] args)
{

Numbers obj = new Numbers();

obj.TotalPrices(10, 69.5);

}
public void TotalPrices()
{
Console.WriteLine("TotalPrice");
}
public void TotalPrices(double Total, double Price)
{
double tp = Total * Price;
Console.WriteLine("Total numbers of items: {0}\nPrice: {1}\nTotal price: {2}", Total, Price, tp);
}
}
}

Output

You might also like