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

📄 testmodar.cc.txt

📁 压缩文件中是Error Correction Coding - Mathematical Methods and Algorithms(Wiley 2005)作者:(Todd K. Moon )的配
💻 TXT
字号:
// ******************************************************************// testModAR.cc -- test the modularized arithmetic// Todd K. Moon// Copyright 2004 by Todd K. Moon// Permission is granted to use this program/data// for educational/research only#include "ModAr.h"#include <iostream>using namespace std;main(){   ModAr::setdefaultm(5);		// set the default modulo   ModAr::setshowmod(0);		// set so modulo is not displayed   ModAr a(3);   ModAr b(4);   ModAr c;   int aint;   c = a+b;   cout << "a=" << a << "  b=" << b << "  c=a+b=" << c << "\n";   a = 2;   cout << "a=" << a << "\n";   c = a+1;   cout << "a+1=" << a+1 << "\n";   cout << "c=" << c << "\n";   aint = a.getv();   ModAr f = -a;   cout << "f=-a= " << f << "\n";   cout << "f^5= " << (f^5) << "\n";   cout << "a=" << a << "  b=" << b << "\n";   cout << "a*b= " << a*b << "\n";   cout << "a/b= " << a/b << "\n";   a /= b;   cout << "a /= b: " << a << "\n";}/*Local Variables:compile-command:"g++ -o testModAr -g testModAr.cc ModAr.cc"End:*/

⌨️ 快捷键说明

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