Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main(){
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- char z;
- int n, s = 8;
- cin >> z >> n;
- if((n == 1 || n == 8) && (z != 'a' && z != 'h')) cout << 5;
- else if((n != 1 && n != 8) && (z == 'a' || z == 'h')) cout << 5;
- else if((n == 1 || n == 8) && (z == 'a' || z == 'h')) cout << 3;
- else cout << 8;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement