FACEDIR: Find the Direction
Problem:
Chef is currently facing the north direction. Each second he rotates exactly 9090 degrees in clockwise direction. Find the direction in which Chef is facing after exactly XX seconds.
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
for(int i=0;i<t;i++)
{
int n;
cin>>n;
n=n%4;
if(n==0)
cout<<"North"<<endl;
else if(n==1)
cout<<"East"<<endl;
else if(n==2)
cout<<"South"<<endl;
else
cout<<"West"<<endl;
}
return 0;
}