0
已解决
蔡辰夕
新手启示者
新手启示者
Math.h:
#include<iostream>
using namespace std;
#define pai 3.14
#define S_Yuan_r(r)(pai*r*r)
#define S_Yuan_d(d)(pai*(d/2)*(d/2))
#define C_Yuan_d(d)(pai*d)
#define C_Yuan_r(r)(pai*r*2)
#define print printf
int pos=1,n,num,xssum,cssum,f=1;
double wzsnum;
bool isnum;
string wzs;
void Print_Fangchengjie(string s){
for(int i=0;i<s.size();i++){
if(s[i]>='0'&&s[i]<='9'){
num=num*10+((int)s[i]-48);
isnum=1;
}
if(s[i]>='a'&&s[i]<='z'){
wzs=s[i];
if(isnum){
xssum=xssum+pos*f*num;
num=0;
isnum=0;
}
else{
xssum=xssum+pos*f;
}
}
if(s[i]=='+'){
cssum=cssum+pos*f*num;
num=0,f=1;
isnum=0;
}
if(s[i]=='-'){
cssum=cssum+pos*f*num;
num=0,f=-1;
isnum=0;
}
if(s[i]=='='){
cssum=cssum+pos*f*num;
num=0,f=1,pos=-1;
isnum=0;
}
}
cssum=cssum+pos*f*num;
if(cssum==0){
print("%.0f",0.0);
}
else{
wzsnum=-1.0*(double)cssum/(double)xssum;
print("%.0f",wzsnum);
}
}
yunsuan.h:
#include<iostream>
using namespace std;
enum yunsuan{
jia,jian,cheng,chu
};
CCX.h:
#include<iostream>
using namespace std;
void Print_Arr (int arr[],int n,char m)
{
for(int i=0;i<n;i++){
cout<<arr[i]<<m;
}
}
//输出任意数据!
void print() {} // 递归终止条件。这是必需的。
template<typename Type, typename... Types>
void print(const Type& arg, const Types&... args)
{
cout << arg<<' ';
print(args...);
}
蔡辰夕在2023-05-26 12:42:25追加了内容
ding
蔡辰夕在2023-05-26 13:00:10追加了内容
https://kuding1024.com/#/share?uuid=4004267a0ada48bb8ad6b4106e823887