37
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
test(); // do not change or remove
8
}
9
10
// Instructions(Method):
11
// Write the method pyramidCount
12
// 1. fill the correct return type and parameter
13
// 2. implement the method
14
15
public static /*return type*/ pyramidCountx(/*parameter*/) {
16
// Add your code here
17
18
}
19
20
//This method tests that your code is correct
21
public static void test() {
22
if(pyramidCount(1) == 1 &&
23
pyramidCount(2) == 5 &&
24
pyramidCount(3) == 14 &&
25
pyramidCount(4) == 30 &&
26
pyramidCount(24) == 4900 &&
27
pyramidCount(88) == 231044)
28
{
29
Console.WriteLine("Congradulations! Challenge Solved!");
30
}
31
else
32
{
33
Console.WriteLine("Challenge failed!");
34
}
35
}
36
}
37
Cached Result