repl.it
@tirinox/

negative_mod

C++

No description

fork
loading
Files
  • main.cpp
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <vector>

using namespace std;

int main() {
  vector <int> a = {10, -10};
  vector <int> b = {3, -3};
  for(int x: a) {
    for(int y: b) {
      cout << x << " // " << y << " = " << x / y << endl;
      cout << x << " % " << y << " = " << x % y << endl << endl;
    }
  }
}