Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- enterA:
- Console.Write("Enter a: ");
- int a = int.Parse(Console.ReadLine());
- if (a <= 0)
- {
- goto enterA;
- }
- enterB:
- Console.Write("Enter b: ");
- int b = int.Parse(Console.ReadLine());
- if (b <= 0)
- {
- goto enterB;
- }
- Console.WriteLine(F(a + b) * F(Math.Abs(a - b)));
- }
- private static double F(int n)
- {
- double sum = 1;
- for (int i = 2; i <= n; i++)
- {
- sum += (1 / Math.Pow(i, 4));
- }
- return sum;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement