#include
using namespace std;
void main()
{
cout << "请输入一个自然数:" << endl;
int n;
cin >> n;
int sum = 0;
for (int i = 1; i <= n; i++)
{
sum += i*(i + 1);
}
cout << "1*2+2*3+3*4+····+"<}
#include
void main()
{
int n,result=1;
printf("请输入一个n值");
scanf("%d",&n); result=result+n*(n+1);
printf("结果为%d",result);
}这是c语言的把输入输出该下就可以了
#include
#include
using namespace std;
int main()
{
int n, i, f;
cin >> n;
f = 1;
for(i = 1; i <= n; ++i)
f *= i;
cout << "1*2*3*...*" << n << "=" << f << endl;
system("pause");
return 0;
}
#include
using namespace std;
void main(void)
{
double sum=0;
int i=1,n;
printf("please input n\n");
scanf("%d",&n);
for(i=1;i<=100;i++)
sum+=i*(i+1);
cout<