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

📄 roots.cpp

📁 miracl-大数运算库,大家使用有什么问题请多多提意见
💻 CPP
字号:
/*
 *   Program to calculate roots
 *
 *   Requires: flash.cpp
 * 
 *   Copyright (c) 1988-2001 Shamus Software Ltd.
 */

#include <iostream>
#include "flash.h"

using namespace std;

Miracl precision=50;

int main()
{ /* Find roots */
    Flash x,y;
    int n;
    miracl *mip=&precision;  
    mip->RPOINT=ON;
    cout << "enter number\n";
    cin >> x;
    cout << "to the power of 1/2\n";
    y=sqrt(x);
    cout << y;
    x=y*y;
    cout << "\nto the power of 2 = \n";
    cout << x;
    if (mip->EXACT) cout << "\nResult is exact!\n";
    return 0;
}

⌨️ 快捷键说明

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