BOTTOM It is known that in regular dice, the sum of opposite faces is 7 7 . A regular dice is rolled and you are given the value X 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
Coder Aryan is a blogging website that provide solution to Coding related problem. Competitive programming solution are also available here.I try to give easy explanation with video solution for all the Coding Questions.Platform Used Are: Hackerrank ,Codechef , Hackerearth , Codeforce , GeekforGeeks.