I'm having problem with the grad total of square roots calculation: The code I have so far is below. Can anyone please help with to calculate the grad total of square roots? What should I use for the calculation? Thanks in advance.
My code is below:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace extraworkassignment
{
class Program
{
static void Main(string[] args)
{
int
Square,
Cube;
Console.WriteLine("\tNumber\tSquare\tCube\tSquareroot\tTotal");
//loop 12 times calculating and displaying values
for (int Number = 1; Number <= 12;
Number++)
{
Square = Number * Number;
Cube = Square * Number;
Math.Sqrt(Number);
Total = Square * Math.Sqrt(Number);
Console.WriteLine("\t{0}\t{1}\t{2}\t{3}\t{4}", Number, Square, Cube, Math.Sqrt(Number), Total);
}// end of calculate and display
Console.ReadLine();
}
public static double Total { get; set; }
}
}

New Topic/Question
Reply



MultiQuote







|