CSharp examples for System:Math Number
get Sum Of The Square
using System;/*from w w w. j a va 2 s . co m*/ public class Main{ public static long getSumOfTheSquare(int n) { double sum = 0; for (var i = n; i > 0; i--) { sum += Math.Pow(i, 2); } return (long) sum; } }