We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3dfef8 commit e4e54f8Copy full SHA for e4e54f8
problem2.c
@@ -0,0 +1,31 @@
1
+Here is the solution for Amazon Problem No. 2
2
+
3
+#include<stdio.h>
4
+void main()
5
+{
6
+ int i,n,temp;
7
+ int a[20];
8
+ int flag[20];
9
+ for(i=1;i<=n;i++)
10
+ {
11
+ flag[i]=0;
12
+ }
13
+ printf("enter the size of the array\n");
14
+ scanf("%d",&n);
15
+ printf("Enter the numbers one by one\n");
16
17
18
+ scanf("%d",&temp);
19
+ a[i]=temp;
20
21
22
23
+ flag[a[i]]+=1;
24
25
+ printf("the element not in the array are:");
26
27
28
+ if(flag[i]==1)
29
+ printf("\n%d",i);
30
31
+}
0 commit comments