Calculate.cs

namespace ASP_1
{
    public class Calculate
    {
        public int Add(int Value1, int Value2)
        {
            return Value1 + Value2;
        }
        public int Subtract(int Value1, int Value2)
        {
            return Value1 - Value2;
        }
        public int Multiply(int Value1, int Value2)
        {
            return Value1 * Value2;
        }
        public double Divide(int Value1, int Value2)
        {
            return Value1 / Value2;
        }
        public string Percentage(int Value1, int Value2)
        {
            Value1 = Value1 * 100;

            return Divide(Value1, Value2) + "%";
        }
    }
}
Author avatar

Sajjad Arif Gul

http://sajjadgul.com
Hi! I am Sajjad Arif Gul, Software Engineer, Web & Mobile Developer from Karachi Pakistan. I love sharing my knowledge that could possibly help someone’s life in some capacity. Happy Coding.

Related posts