-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathThe Dice Problem.cpp
More file actions
36 lines (31 loc) · 703 Bytes
/
The Dice Problem.cpp
File metadata and controls
36 lines (31 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* Write a c++ program The Dice problem.
SUMIT KUMAR
*/
#include<iostream>
using namespace std;
int main()
{
int t,s;
cin>>t;
while(t>0)
{
cin>>s;
switch(s)
{
case 1 : cout<<"6"<<endl;
break;
case 2 : cout<<"5"<<endl;
break;
case 3 : cout<<"4"<<endl;
break;
case 4 : cout<<"3"<<endl;
break;
case 5 : cout<<"2"<<endl;
break;
case 6 : cout<<"1"<<endl;
break;
}
t--;
}
return 0;
}