CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Created by Welcome To Dodgeball
#include <iostream>
using namespace std;
int main() {
int num1; char math; int num2;int answer;
cin >> num1; cin >> math; cin >> num2;
switch(math) {
case '+':
answer = num1 + num2;
cout << num1 << ' ' << math << ' ' << num2 << " = " << answer;
break;
case '&':
cout << num1 << ' ' << math << ' ' << num2 << " = " << num1 << num2;
break;
}
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run