目录
概要
这个计算机与其他不同的是有科学计算机的内容,也有基本计算机的内容。使用函数之间的调用,涵盖c语言的大部分基础和c++的内容,涉及基本项目逻辑。学完c语言和c++基础的可以很快速的读懂此项目。
整体架构流程
此项目的基本功能:
基本运算
- 加减运算
- 乘除运算
- 乘方运算
进制转换
- 十进制转其他进制
- 其他进制转十进制
排列组合
- 排列数
- 组合数
几何运算
- 梯形面积
- 三角形面积
- 圆形面积
- 长(正)方形面积
- 扇形面积
这些功能模块基础上都加上返回上一层操作&返回首页
项目的显示页面有:
登录页面
首页页面
功能选择页面
说明页面
其它页面
基本运算页面
进制运算页面
排列组合页面
几何运算页面
进制选择页面
其它进制转十进制选择页面
排列组合选择页面
几何运算功能选择页面
全部代码
头文件
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<Windows.h>
using namespace std;
#define _CRT_SECURE_NO_WARNINGS//禁用安全函数警告
#pragma warning(disable:6031)//禁用 6031 的安全警告
void SM(); //说明函数
void QT(); //其它函数
void index_36(); //首页页面
void operationIndex_36(); //功能页面
void fundamentalOperation_36(); //基本运算
void numericalBaseConversion_36(); //进制运算
void permutationAndCombination_36(); //排列组合
void geometryCalculation_36(); //几何运算
double ti(); //梯形面积
double yuan(); //圆面积
double san(); //三角形面积
double zheng(); //矩形面积
double shan(); //扇形面积
int CC(); //组合
int AA(); //排列
int SZ();
void QTZSYM(); //其它进制转十进制页面
int JBYS(); //基本运算
int SLZS(); //16转10
int EZS(); //2转10
int BZS(); //8转10
void MMJM(); //密码
void HYJM(); //欢迎界面
void SJYS(); //时间元素
源文件
main部分
int main()
{
//index_36(); //进入页面
HYJM();
return 0;
}
void index_36() //进入页面
{
system("cls");
cout<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t-计算机-"<<endl;
cout << "\t\t\t\t\t\t QvQ" << endl;
cout<<endl;
cout<<"\t\t\t\t\t\t1.运算开始\n"<<endl;
cout<<"\t\t\t\t\t\t2.使用说明\n"<<endl;
cout<<"\t\t\t\t\t\t3.其它\n"<<endl;
cout<<"\t\t\t\t\t\t4.关机\n" << endl;
cout<<endl;
cout<<"\t\t\t\t\t\t请输入操作<1/2/3/4>:";
int e;
while(true)
{
cin>>e;
switch(e)
{
case 1:
operationIndex_36();//开始使用
break;
case 2:
SM();//说明页面
break;
case 3:
QT();//其它页面
break;
case 4:
system("cls");
exit(0);//其它页面
break;
default:
cout<<"\t\t\t\t\t\t输入有误,重新输入!\n"<<endl;
continue;
}
}
}
//
//
//
//
//
void operationIndex_36() //功能选择页面
{
system("cls");
cout<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t1.基本运算"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t2.进制运算"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t3.排列运算"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t4.几何运算"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t5.返回首页"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t请输入操作<1/2/3/4/5>:";
int e;
while(1)
{
cin>>e;
if(e==1)
{
fundamentalOperation_36();//基本运算函数
break;
}
else if(e==2)
{
numericalBaseConversion_36();//进制转换函数
break;
}
else if(e==3)
{
permutationAndCombination_36();//排列组合函数
break;
}
else if(e==4)
{
geometryCalculation_36();//几何计算函数
break;
}
else if(e==5)
{
index_36();//返回首页
}
else
{
cout<<"输入有误,请重新输入:";
cin>>e;
}
}
}
//功能区
void fundamentalOperation_36() //基本运算函数
{
JBYS();
}
//
//
//
//
//
void numericalBaseConversion_36() //进制转换函数
{
system("cls");
cout<<endl;
cout << "\t\t\t\t\t\t--进制运算--" << endl;
cout<<endl;
cout<<"\t\t\t\t\t\t1.十进制转其它进制"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t2.其它进制转十进制"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t3.返回上一层"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t4.返回首页"<<endl;
cout<<endl;
cout<<"\t\t\t\t\t\t请输入操作<1/2/3/4>:";
int e;
while(true)
{
cin>>e;
switch(e)
{
case 1:
SZ();
break;
case 2:
QTZSYM();
break;
case 3:
operationIndex_36();
break;
case 4:
index_36();
break;
default:
cout<<"\t\t\t\t\t\t输入有误,重新输入!\n"<<