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

📄 bignum.cpp

📁 可以进行无限制的整数计算
💻 CPP
字号:
// $$root$$.cpp : Defines the entry point for the application.//#include "stdafx.h"
#include "USuperInt.h"

int APIENTRY WinMain(HINSTANCE hInstance,                     HINSTANCE hPrevInstance,                     LPSTR     lpCmdLine,                     int       nCmdShow){
	try
	{	
		
		//下面的代码计算Fibonacci级数的前200个。
		CStdioFile f;
		f.Open("D:\\USuperInt.Txt",CFile::modeCreate|CFile::modeWrite|CFile::typeText);
		CUSuperInt a = 1;
		CUSuperInt b = 1;
		for (int i=0; i<99; i++)
		{
		
			a += b;
			f.WriteString(a.ToDecStr());
			f.WriteString("\n");
			b += a;
			f.WriteString(b.ToDecStr());
			f.WriteString("\n");
		}

		f.Close();
		AfxMessageBox("计算完成");
	}
	catch (CMyException* e)
	{
		AfxMessageBox(e->m_szMsg);		
	}
	catch(...)
	{
		AfxMessageBox("未知错误");
	}
	return 0;	
	
}

⌨️ 快捷键说明

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