We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
using System;
using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace METHOD_OVERLOADING { class Program {
//public void Add()
//{ // int a = 20; // int b = 30; // int c = a + b; // Console.WriteLine(c); //} public void Add(int a, int b) { int c = a + b; Console.WriteLine(c); } public int Add(int a, int b) { int c = a + b; return c; }
//public void Add(string a, string b)
//{ // string c = a + " " + b; // Console.WriteLine(c); //} //public void Add(float a, float b) //{ // float c = a + b; // Console.WriteLine(c); //}
static void Main(string[] args)
{ Program p = new Program(); //p.Add(); // p.Add(2.5f, 1.5f); //p.Add(10, 5); p.Add("Adil", "Mehmood"); Console.ReadLine(); } } }
PRACTICAL NO 1 Create An Application To Print On Screen The Output of Adding, Subtracting, Multiplying and Dividing Two Numbers Entered by The User in C#.