Skip to content

Commit 93429e6

Browse files
authored
Merge pull request #45 from aayush96692/patch-2
snack
2 parents eec50cd + 0cf7232 commit 93429e6

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

snack

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#include<iostream>
2+
using namespace std;
3+
#include<stdio.h>
4+
5+
int main()
6+
{
7+
int T,N[10],flag,test[10];
8+
int snack[]={2010,2015,2016,2017,2019};
9+
cin>>T;
10+
if(T>=1 && T<=10){
11+
for(int i=0;i<T;i++)
12+
{
13+
cin>>N[i];
14+
flag=0;
15+
if(N[i]>=2010 && N[i]<=2019){
16+
for(int j=0;j<5;j++)
17+
{
18+
if(N[i]==snack[j])
19+
flag=1;
20+
}
21+
test[i]=flag;
22+
}
23+
else
24+
exit(0);
25+
}
26+
}
27+
else
28+
exit(0);
29+
for(int i=0;i<T;i++)
30+
{
31+
if(test[i]==1)
32+
cout<<"HOSTED"<<endl;
33+
else
34+
cout<<"NOT HOSTED"<<endl;
35+
}
36+
return 0;
37+
}

0 commit comments

Comments
 (0)