?? main.cpp
字號:
#include "operation.h"
#include <iostream>
#include<vector>
#include<cassert>
#define MAX 40
using namespace std;
int main()
{
operation oper;
cout<<"請輸入兩個數"<<endl;
char test1[MAX],test2[MAX];
for(int i=0;i<MAX;i++){
test1[i]=test2[i]=0;
}
char k;
i=0;
while((k=getchar())!=' '){
test1[i]=k;
i++;
}
assert(i<40);
char c;
cin>>c;
i=0;
while((k=getchar())!='\n'){
test2[i]=k;
i++;
}
assert(i<40);
if(c=='*') oper.Mul(strrev(test1),strrev(test2));
else if(c=='-'){
oper.minu(strrev(test1),strrev(test2));
cout<<endl;
}
else if(c=='+'){
oper.ad(strrev(test1),strrev(test2));
cout<<endl;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -