Advertisement
strg_guy

Untitled

Jun 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string a;
  8.     getline(cin, a);
  9.    
  10.     char x, y;
  11.  
  12.     if (a.size() > 1)
  13.         x = a[a.size() - 2];
  14.     else
  15.         x = 0;
  16.     y = a[a.size() - 1];
  17.    
  18.     int num = x * 10 + y;
  19.  
  20.     if (num % 4 == 0)
  21.         cout << 4 << endl;
  22.     else
  23.         cout << 0 << endl;
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement