Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 6 years ago.
Calculate the algebraic expression Z, for which n is inputted by user. Use 2 for loops to solve the problem.
My code so far:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int n, k = 1;
double z;
float sum, p;
n = Console.Read();
for (int i = 0; i < n; i+=2)
{
sum += p;
for (int j = 0; j < n; j++)
{
p *= (3 * k + 2);
}
}
}
}
}
I'm totally stack in the for loops... any help is appreciated.