diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index 73c0385..4144077 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -12,19 +12,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Conifg cmake + - name: Cmake uses: threeal/cmake-action@v1.3.0 - - name: CMake build - run: | - cd ${{ github.workspace }} - ls - cd build - cmake --version - cmake ../ - shell: sh - name: Upload exec file uses: actions/upload-artifact@v3.1.2 with: name: MCT-Pre path: build/MCT - diff --git a/.github/workflows/stable-build.yml b/.github/workflows/stable-build.yml index 3736fbc..f429f6a 100644 --- a/.github/workflows/stable-build.yml +++ b/.github/workflows/stable-build.yml @@ -1,4 +1,4 @@ -name: MCT-StableBuild +name: Stable-Build on: push: @@ -7,29 +7,15 @@ on: branches: [ "Stable" ] jobs: - linux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: build-linux - run: make - working-directory: src - - name: Build MCT-Linux - uses: actions/upload-artifact@v3.1.2 - with: - name: MCT-Linux - path: src/MCT-Linux - - windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: build-windows - run: g++ MCT-Windows.cpp -o MCT-Windows.exe - working-directory: src - - name: Build MCT-Windows + - name: Checkout + uses: actions/checkout@v3 + - name: Cmake + uses: threeal/cmake-action@v1.3.0 + - name: Upload exec file uses: actions/upload-artifact@v3.1.2 with: - name: MCT-Windows - path: src/MCT-Windows + name: MCT + path: build/MCT diff --git a/.gitignore b/.gitignore index af96791..45bfd2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .vscode +.cache build diff --git a/CMakeLists.txt b/CMakeLists.txt index c9ccfe8..a71fc82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9) +cmake_minimum_required(VERSION 3.28.3) PROJECT(MCT) INCLUDE_DIRECTORIES( @@ -6,3 +6,4 @@ INCLUDE_DIRECTORIES( ) AUX_SOURCE_DIRECTORY(src ./src) ADD_EXECUTABLE(${PROJECT_NAME} ./src/main.cpp) + diff --git a/README.md b/README.md index c98a8df..c161075 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,4 @@ -
- -
+# In prograssing -

MathCentralTool

- -
- -[![Stars](https://img.shields.io/github/stars/QuantumLS-Studio/MathCentralTool?logo=github&label=Stars&style=for-the-badge)](https://github.com/QuantumLS-Studio/MathCentralTool/stargazers) -[![License](https://img.shields.io/github/license/QuantumLS-Studio/MathCentralTool?logo=github&label=License&style=for-the-badge&color=ff7a35)](https://github.com/QuantumLS-Studio/MathCentralTool/blob/master/LICENSE) -[![Issues](https://img.shields.io/github/issues/QuantumLS-Studio/MathCentralTool?logo=github&lable=issues&style=for-the-badge "Issues")](https://github.com/QuantumLS-Studio/MathCentralTool/issues) -[![Forks](https://img.shields.io/github/forks/QuantumLS-Studio/MathCentralTool?logo=github&style=for-the-badge "Forks")](https://github.com/QuantumLS-Studio/MathCentralTool/forks) - -[![Version](https://img.shields.io/github/v/tag/QuantumLS-Studio/MathCentralTool?label=Version&style=for-the-badge "Version")](https://github.com/QuantumLS-Studio/MathCentralTool/releases/latest) - -[![Stable](https://img.shields.io/github/actions/workflow/status/QuantumLS-Studio/MathCentralTool/stable-build.yml?label=Stable&style=for-the-badge "Stable")](https://github.com/QuantumLS-Studio/MathCentralTool/actions/workflows/stable-build.yml) -[![Preview](https://img.shields.io/github/actions/workflow/status/QuantumLS-Studio/MathCentralTool/preview-build.yml?label=Preview&style=for-the-badge "Preview")](https://github.com/QuantumLS-Studio/MathCentralTool/actions/workflows/preview-build.yml) - -
- -[🀄简体中文](/README_zh.md) | 🔠[English](/README.md) - -## 📃 Introduce - -A terminal-based math tool that runs on linux. - -This program is free and open source. We allow everyone to use the source code for enrichment, compilation, etc. But we don't take any responsibility for any problems! - -⚠ Note: This program cannot be used for science! If anything goes wrong, do so at your own risk! - -## ❔ How to use - -Look in the GitAction and choose waht you need. - -Or clone and compile by yourself. - -📦 Compilation environment requirements: cmake, ninja, gcc - -## 🧑‍💻 Contribution and thanks - -[FTS427](https://github.com/FTS427) responsible for the entire project - -[JWJUN233233](https://github.com/JWJUN233233) provides help with "Git Action" for this project - -[N55743](https://github.com/N55743) provided Windows testing and translation services for the entire project, and asked some questions and suggestions - -Thank every developer very much for their help!👍 - -## 👀 Other - -Change log [change](/change_log.md) - -This project also powered by [ECCPH](https://github.com/QuantumLS-Studio/ECCPH) - -Old versions[MathCentralTools](https://github.com/FTS427/MathCentralTools)(Archived🗃️) +Yes, we're turning the WHOLE poject to C, PR is always welcome! diff --git a/README_zh.md b/README_zh.md index 1d19bfb..c161075 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1,55 +1,4 @@ -
- -
+# In prograssing -

MathCentralTool

+Yes, we're turning the WHOLE poject to C, PR is always welcome! -
- -[![星标](https://img.shields.io/github/stars/QuantumLS-Studio/MathCentralTool?logo=github&label=星标&style=for-the-badge)](https://github.com/QuantumLS-Studio/MathCentralTool/stargazers) -[![协议](https://img.shields.io/github/license/QuantumLS-Studio/MathCentralTool?logo=github&label=协议&style=for-the-badge&color=ff7a35)](https://github.com/QuantumLS-Studio/MathCentralTool/blob/master/LICENSE) -[![议题](https://img.shields.io/github/issues/QuantumLS-Studio/MathCentralTool?logo=github&lable=议题&style=for-the-badge "议题")](https://github.com/QuantumLS-Studio/MathCentralTool/issues) -[![分支](https://img.shields.io/github/forks/QuantumLS-Studio/MathCentralTool?logo=github&style=for-the-badge "分支")](https://github.com/QuantumLS-Studio/MathCentralTool/forks) - -[![版本](https://img.shields.io/github/v/tag/QuantumLS-Studio/MathCentralTool?label=版本&style=for-the-badge "版本")](https://github.com/QuantumLS-Studio/MathCentralTool/releases/latest) - -[![Stable](https://img.shields.io/github/actions/workflow/status/QuantumLS-Studio/MathCentralTool/stable-build.yml?label=Stable&style=for-the-badge "Stable")](https://github.com/QuantumLS-Studio/MathCentralTool/actions/workflows/stable-build.yml) -[![Preview](https://img.shields.io/github/actions/workflow/status/QuantumLS-Studio/MathCentralTool/preview-build.yml?label=Preview&style=for-the-badge "Preview")](https://github.com/QuantumLS-Studio/MathCentralTool/actions/workflows/preview-build.yml) - -
- -[🀄简体中文](/README_zh.md) | [🔠English](/README.md) - -## 📃介绍 - -一个基于终端的数学小工具。 - -本程序是免费开源的,此源代码可以随意使用。允许任何人使用源代码进行扩充,编译等操作。出现任何问题,本人不承担任何责任! - -⚠ 注意:本程序处于开发阶段,不可用于科学的精密计算!如果出现任何问题,后果自负! - -## ❔如何使用 - -在GitAction中寻找符合自己设备的版本 - -或自行拉取编译 - -📦编译环境需求:cmake, ninja,gcc - -## 🧑‍💻感谢 - -[FTS427](https://github.com/FTS427)负责了整个项目 - -[JWJUN233233](https://github.com/JWJUN233233)提供了对于这个项目有关于“Git Action”的帮助 - -[N55743](https://github.com/N55743)提供了Windows端的测试和提出了一些问题 - -在此非常感谢每一位贡献人员的帮助!👍 - -## 👀其他 - -之前的更改?在[这里](/change_log.md) - -本项目使用了头文件[ECPPH](https://github.com/QuantumLS-Studio/ECPPH) - -先前的版本参见[MathCentralTools](https://github.com/FTS427/MathCentralTools)(已归档🗃️) diff --git a/assets/MCT.png b/assets/MCT.png deleted file mode 100644 index 32f64f4..0000000 Binary files a/assets/MCT.png and /dev/null differ diff --git a/change_log.md b/change_log.md index 04afebc..5d401f1 100644 --- a/change_log.md +++ b/change_log.md @@ -1,3 +1,5 @@ +> 本文件不再使用 + # 数学集成工具 > 注:本更新日志从 v0.0.0.7 开始使用 diff --git a/make.sh b/make.sh deleted file mode 100755 index 9e423bd..0000000 --- a/make.sh +++ /dev/null @@ -1,5 +0,0 @@ -cmake -S . -B ./build && -cd ./build && -ninja && -echo "Done!" && -echo "Exec -> build/MCT" diff --git a/src/include/ecp.h b/src/include/ecp.h deleted file mode 100644 index c25c2d5..0000000 --- a/src/include/ecp.h +++ /dev/null @@ -1,95 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -using namespace std; - -int error(){ - printf("\033[1,31mERROR!\033[0m\a\n"); - return 1; -} - -int clear(){ - system("clear"); - return 0; -} - -void print(const char T[],string color,bool i){ - if(i==true){ - if(color=="none") - cout<0){ - while(l>1){ - print(S,color,false); - l--; - } - print(S,color,i); - } - error(); -} - -void dash(const char T[]){ - cout<<" - "< 0){ - print("+",bc,false); - line("-",l+2,bc,false); - print("+",bc,true); - print("| ",bc,false); - print(T,tc,false); - print(" |",bc,true); - print("+",bc,false); - line("-",l+2,bc,false); - print("+",bc,i); - } - else - error(); -} -void hy(const char T[]){cout<<"==> "< ","white",false); - cin >> q; - if (q=='1'){ - int a,b; - char o; - print("calc> ","white",false); - cin >>a>>o>>b; - while (a!='0'&&b!='0'&&o!='c'){ - cout << calc(a,b,o) < ","white",false); - cin >>a>>o>>b; - } - } - if (q=='2') - B(); - if (q=='3') - C(); - if (q=='4') - D(); - if (q=='E'||q=='e') - break; - if (q=='A'||q =='a'){ - clear(); - line("=",20,"blue",true); - dash("MCT Preview v0.0.1.3-4"); - dash("Made by QuantumLS-Studio"); - dash("Url: https://github.com/QuantumLS-Studio/MathCentralTool"); - line("=",20,"blue",true); - } - else{ - clear(); - error(); - } - } - return 0; -} diff --git a/src/module/calc.cpp b/src/module/calc.cpp deleted file mode 100644 index b71dbca..0000000 --- a/src/module/calc.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -int calc(int fn, int bn, char o){ - if (o=='+') - return fn+bn; - if (o=='-') - return fn-bn; - if (o=='*') - return fn*bn; - if (o=='/'){ - if (fn==0) - error(); - else - return fn/bn; - } - if (o=='^'){ - if (fn==bn==0) - error(); - int value=fn; - for (size_t i = 0; i <= bn; i++) - { - value=fn*value; - } - return value; - } - else{ - error(); - return 0; - } -} diff --git a/src/module/cg.cpp b/src/module/cg.cpp deleted file mode 100644 index bc56f82..0000000 --- a/src/module/cg.cpp +++ /dev/null @@ -1,16 +0,0 @@ -//E函数,几何计算 -void E(){ - hy("几何计算"); - while(true){ - line("-",20,"yellow",true); - print("输入任意键继续,输入“\033[1;33mc\033[0m”退出...","no",true); - cin >> q; - if (q == 'c' || q == 'C'){ - clear(); - break; - } - else{ - //矩形 梯形 三角形 圆 面积,周长,体积 - } - } -} \ No newline at end of file diff --git a/src/module/chn.cpp b/src/module/chn.cpp deleted file mode 100644 index f74931b..0000000 --- a/src/module/chn.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//D函数,数值分析器 -void D(){ - clear(); - long double x, a; - hy("数值分析器"); - while(true){ - line("-",20,"yellow",true); - print("输入任意值继续,输入\033[1;33mC\033[0m退出...","no",true); - cin >> q; - if (q == 'c' || q == 'C'){ - clear(); - break; - } - else{ - print("请输入一个数:","blue",true); - cin >> x; - if (x == 0){ - cout << x << "是整数" << endl; - cout << x << "是正数" << endl; - cout << x << "不分质数合数" << endl; - cout << x << "是偶数" << endl; - } - else{ - if (modf(x, &a) == 0.0) - cout << x << "是整数" << endl; - else - cout << x << "是分数" << endl; - if (x > 0) - cout << x << "是正数" << endl; - else - cout << x << "是负数" << endl; - if (x == 1) - cout << x << "不分质数合数" << endl; - if (int(x) - x != 0) - cout << x << "不分质数合数" << endl; - else{ - int n=0, i; - for(i=2;i0) - cout << x << "是合数" << endl; - cout << x << "是质数" << endl; - } - if (int(x) == x){ - if (int(x) % 2 == 0) - cout << x << "是偶数" << endl; - cout << x << "是奇数" << endl; - } - else{ - if (x/2 - int(x)/2 == 0) - cout << x << "是偶数" << endl; - cout << x << "是奇数" << endl; - } - } - } - } -} \ No newline at end of file diff --git a/src/module/maxn.cpp b/src/module/maxn.cpp deleted file mode 100644 index 135890f..0000000 --- a/src/module/maxn.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//B函数,计算最大公约数 -void B(){ - clear(); - double num3, num4; - hy("最大公约数"); - print("\033[1;43;37m[NOTE]\033[0m:本功能只支持两个数之间的运算!","no",true); - while(true){ - line("-",20,"yellow",true); - print("输入任意值继续,输入\033[33;1mC\033[0m退出","no",true); - cin >> q; - if(q == 'c' || q == 'C'){ - clear(); - break; - } - else{ - print("请输入第一个数:","white",true); - cin >> num3; - print("请输入第二个数:","white",true); - cin >> num4; - num3 = abs(num3); - num4 = abs(num4); - while (num3 != num4){ - if (num3 > num4) - num3 -= num4; - else - num4 -= num3; - } - cout << "这两个数的的最大公约数是: " << num3 + num4 << endl; - } - } -} \ No newline at end of file diff --git a/src/module/minn.cpp b/src/module/minn.cpp deleted file mode 100644 index 632891c..0000000 --- a/src/module/minn.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//C函数,计算最小公倍数 -void C(){ - clear(); - hy("最小公倍数"); - print("\033[1;43;37m注意\033[0m:本功能只支持两个数之间的运算!","no",true); - while(true){ - line("-",20,"yellow",true); - print("输入任意值继续,输入\033[33;1mC\033[0m退出...","no",true); - cin >> q; - if(q == 'c' || q == 'C'){ - clear(); - break; - } - else{ - int n3; - double num5, num6; - while (true){ - print("请输入第一个数:","white",true); - cin >> num5; - print("请输入第二个数:","white",true); - cin >> num6; - if (num5 != int(num5) || num6 != int(num6)) - error(); - else - break; - } - n3 = (num5 > num6) ? num5 : num6; - while (true){ - if (n3 % int(num5) == 0 && n3 % int(num6) == 0){ - cout << "这两个数的的最小公倍数是:" << n3 << endl; - break; - } - else - ++n3; - } - } - } -}