Submission

Status:

PPP--PPPPP

Subtask/Task Score:

80/100

Score: 80

User: Anan19

Problemset: เส้นทางคณิตศาสตร์

Language: cpp

Time: 0.003 second

Submitted On: 2025-12-27 11:19:44

#include <bits/stdc++.h>
using namespace std;

int main() {
	int x,y,z;
	cin >> x >> y >> z;
	
	if (z==1){
		cout << x+y;
	}
	if (z==2){
		cout << x-y;
	}
	if (z==3){
		cout << x*y;
	}
	if (z==4 && y==0){
		
		cout << "cannot divide by zero";
	}
	if (z==5 && y==0){
		
		cout << "cannot divide by zero";
	}
	
	
}