Whats wrong with my division function void mod() it doesn't work all the others do.
#include <iostream> using namespace std; void add(int a, int b) { int z = a + b; cout << "Sum"" " << z << endl; } /*creates the addition function*/ void subtract(int c, int d) { int f = c - d; cout <<" The result is:" << f << endl; } /*creates the substraction function*/ void times(int x, int y) { int m; m = x * y; cout << "Product:" << m; cout << endl; } /*creates the multiplication function*/ void mod(int e, int v) { int s = e / v; cout << endl; } /*creates the division function*/ int main() { cout << "Calculator" << endl; cout << "Input value_1:" << endl; int q; cin >> q; cout << "Input value_2:" << endl; int o; cin >> o; cout << "Select a mode:" << endl; cout << "1.Addition\n"; cout << "2.Substraction\n"; cout << "3.Multiplication\n"; cout << "4.Division\n"; int w; cin >> w; if (w == 1) { add(q, o); } if (w == 2) { subtract(q, o); } if(w==3){ times(q,o); } if(w==4){ mod(q,o); } return 0; }