a program that reads in a number n and then outputs the sum of squares of the numbers from 1 to n. If the input is 3, for example, the output should be 14, because 1²+2²+3² = 1+4+9=14
1
Expert's answer
2012-07-26T08:48:28-0400
int inp; double res=0; Console.WriteLine("Enter number: "); inp = int.Parse(Console.ReadLine());
Comments
Leave a comment