Skip to main content

C#: Program #31 (Methods6)

using System;

namespace Methods6
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("The sum of 5.4+7.0 is:{0}",sum(5.4,7.0));
            Console.WriteLine("The sum of 5+7 is:{0}", sum(5, 7));

            Console.ReadKey();
        }
        static double sum(double a,double b)
        {
            return a + b;
        }
        static double sum(int a,int b)
        {
            return a + b;
        }
    }
}

Comments

Popular posts from this blog