We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34a8adb commit df5aee6Copy full SHA for df5aee6
day28/CPP/day28_shubhendra-20
@@ -0,0 +1,34 @@
1
+/*
2
+ Author: Shubhendra Singh
3
+ github: shubhendra-20
4
+*/
5
+
6
+#include <iostream>
7
+using namespace std;
8
9
+int main() {
10
+ int i,j,n,x,flag;
11
12
+ cin>>n;
13
+ int a[n];
14
+ for(i=0;i<n;i++)
15
+ {
16
+ cin>>a[i];
17
+ }
18
+ cin>>x;
19
+ flag=0;
20
21
22
+ if(a[i]==x)
23
24
+ flag=1;
25
+ cout<<(i+1)<<endl;
26
+ break;
27
28
29
+ if(flag==0)
30
31
+ cout<<"undefined";
32
33
+ return 0;
34
+}
0 commit comments