Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "ru");
- int a = 11;
- int b = 3;
- cout << a % b << endl; // оператор деления по модулю (получение остатка от деления)
- cout << (a %= b) << endl; // оператор присваивания с делением по модулю
- }
Advertisement
Add Comment
Please, Sign In to add comment