📄 roots.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 + -