⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pex10_6.cpp

📁 数据结构C++代码,经典代码,受益多多,希望大家多多支持
💻 CPP
字号:
#include <iostream.h>
#pragma hdrstop

// include solution to the committee problem
#include "comm.h"

void main(void)
{
	int n,i;
	
	// read the degree of the polynomial
	cout << "Enter n: ";
	cin >> n;
	
	// print the polymomial from highest to lowest
	// powers of x
	for(i=n;i >= 0;i--)
	{
		cout << comm(n,i) << "x**" << i;
		if (i != 0)
			cout << " + ";
	}
	cout << endl;
}

/*
<Run>

Enter n: 8
1x**8 + 8x**7 + 28x**6 + 56x**5 + 70x**4 + 56x**3 + 28x**2 + 8x**1 + 1x**0
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -