Exercise # 2:: M Hadi Khan: 11305: PF Lab 12
Exercise # 2:: M Hadi Khan: 11305: PF Lab 12
11305:
PF LAB 12:
EXERCISE # 2:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp96
{
class Program
{
public static void Main(String[] args)
{
Method(numArray);
Console.ReadLine();
}
public static void Method(double[] numArray)
{
double sum = 0;
double ave;
double length = numArray.Length;
Console.WriteLine();
Console.WriteLine();
for (int i = 0; i < length; i++)
{
sum = sum + numArray[i];
}
namespace ConsoleApp87
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("enter future value: ");
int f = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(PresentValue(f,air,y));
}
static double PresentValue(int f, double air, int y )
{
double p = f /Math.Pow ((1 + air),y);
return p;
}
}
}