摘要:
Counting TrianglesProblem DescriptionGiven an equilateral triangle with n thelength of its side, program to count how many triangles in it.InputThe length n (n using namespace std;int num[1000];void cal(){ num[1] = 1;int i; for(i = 2;i>n&&n) { sum = n*(n+1)*(n+2)/6; n-=1; ... 阅读全文