BOTTOM
It is known that in regular dice, the sum of opposite faces is .
A regular dice is rolled and you are given the value showing on the top face. Determine the value on the bottom face.
CODE:
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.ignore(NULL);
int t;
cin>>t;
while (t--)
{
int x;
cin>>x;
cout<<7-x;
cout<<"\n";
}
return 0;
}
Sample Input 1
3
3
1
6
Sample Output 1
4
6
1
Comments
Post a Comment