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 a9bbbaf commit d1e499eCopy full SHA for d1e499e
problem8.c
@@ -0,0 +1,25 @@
1
+/*
2
+Solved by Haripriya, Dept of CSE
3
+*/
4
+
5
+#include<stdio.h>
6
+int main()
7
+{
8
+int n,i,x1,x2,x,a[50];
9
+printf("enter size:");
10
+scanf("%d",&n);
11
+printf("\n enter array elements:");
12
+for(i=0;i<n;i++)
13
14
+scanf("%d",&a[i]);
15
+}
16
+x1=1;
17
+x2=a[0];
18
+for(i=2;i<=n+1;i++)
19
+x1= x1^i;
20
+for(i=1;i<n;i++)
21
+x2= x2^a[i];
22
+x= x1^x2;
23
+printf("\n %d",x);
24
+return 0;
25
0 commit comments