How do I save every value of k in the loop?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { double a = 2; double b = 3; double c = 4; double g = 2; double t = 3; double n = 4; int A = 0; while (A<10){ double d = 4/(a*b*c); double e = -4/(g*t*n); double k = d+e; if(A%2 == 0){ g+=2; t+=2; n+=2; A++; } else if(A%2 == 1){ a+=2; b+=2; c+=2; Console.WriteLine(k); A++; } } } } }