Advertisement
Josif_tepe

Untitled

Jan 23rd, 2024
860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int x;
  6.     cin >> x;
  7.    
  8.     if((x + 0) % 4 == 0) {
  9.         cout << 0 << endl;
  10.     }
  11.     else if((x + 1) % 4 == 0) {
  12.         cout << 9 << endl;
  13.     }
  14.     else if((x + 2) % 4 == 0) {
  15.         cout << 18 << endl;
  16.     }
  17.     else {
  18.         cout << 27 << endl;
  19.     }
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement