Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int x, y, z, a;
- cin >>x>>y>>z;
- a = (x * y) + z;
- // mengubah hasil a bernilai genap ke ganjil dan sebaliknya
- if(a % 2 == 0) {
- ++a;
- } else {
- --a;
- }
- // dikomplemen
- cout << ~a<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement