Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/8.cs Secret

Created May 15, 2019 17:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ssartell/34e7c674c9131843b03be2ddf9663197 to your computer and use it in GitHub Desktop.
/* LINQ Puzzle #8 *******************************************************
Description: Given an integer n, count the number of squares on a chess board of size n by n. Must count squares of all sizes including 1x1, 2x2, 3x3, etc.
Sample Input: n = 2;
Sample Output: 5;
Sample Input: n = 3;
Sample Output: 14;
************************************************************************/
// Given:
var n = 10;
// Your solution goes here:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment