1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- public class Calculate
- {
- public static double Sum(double x,double y)
- {
- return x + y;
- }
- public static double Subtraction(double x, double y)
- {
- return x - y;
- }
- public static double Multiplication(double x, double y)
- {
- return x * y;
- }
- public static double Division(double x, double y)
- {
- return x / y;
- }
- public static double Exponentiation(double x, double y)
- {
- double result = x;
- for(int i=1; i<= y;i++)
- {
- result = result * x;
- }
- return result;
- }
- }
- }
|