Friday, 1 September 2017

C# programming tutorial to implement demonstrate output parameter

C# program example to use of output parameter in C# 

program

using System;
class Program
    {
        static void mult(int x,int y, out int z)
        {
             z = x * y;
        }
        static void Main(string[] args)
        {
            int m, n, o;
            Console.WriteLine("Enter the Number1:");
             n = Convert.ToInt32(Console.ReadLine());
             Console.WriteLine("Enter the Number2:");
             o = Convert.ToInt32(Console.ReadLine());
            mult(n, o, out m);
            Console.WriteLine("The Multiplication : {0}", m);
        }

    } 

Output


0 comments:

Post a Comment