Submission
Status:
PPPPPPPP--
Subtask/Task Score:
80/100
Score: 80
User: Wkraxcker
Problemset: เส้นทางคณิตศาสตร์
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-15 11:53:50
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
int x,y,z; cin>>x>>y>>z;
if(z==1)cout<<x+y;
else if(z==2)cout<<x-y;
else if(z==3)cout<<x*y;
else if((z==4 && y==0) || (z==5 && y==0)){cout<<"cannot divided by zero";}
else if(z==4){cout<<x/y;}
else if(z==5){cout<<x%y;}
}