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

📄 main.cpp

📁 多项式运算
💻 CPP
字号:
#include <stdio.h>
#include <stdlib.h>

#include "slist.h"
#include "polynomial.h"

int main()
{
	list_t poly_1,poly_2,poly_sum,poly_dif;

	FILE *fInput, *fOutput;

	if ( (fInput=fopen("input.txt","r"))==NULL )
	{
		printf("Cannot Open the Input File.\n");
		return ERROR;
	}

	if ( (fOutput=fopen("022397.txt","w"))==NULL )
	{
		printf("Cannot Open the Output File.\n");
		return ERROR;
	}

	poly_1 = init_list();
	poly_2 = init_list();
	
	fill_list(fInput , poly_1);
	fill_list(fInput , poly_2);

	fclose(fInput);

	poly_sum = poly_add(poly_1 , poly_2);
	poly_dif = poly_mul(poly_1 , poly_2);

	out_data(fOutput , poly_sum);
	out_data(fOutput , poly_dif);

	fclose(fOutput);

	return 0;
}

⌨️ 快捷键说明

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