Skip to content

Commit 33c7c1f

Browse files
committed
Create problem28.c
1 parent 3dcd6c7 commit 33c7c1f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

problem28.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//Solved by Aishwarya M, IT 'A'
2+
#include<stdio.h>
3+
void main()
4+
{
5+
int a[100],b[100],n,n1,i,j;
6+
printf("Enter the no of elements");
7+
scanf("%d",&n);
8+
printf("Enter the elements");
9+
for(i=1;i<=n;i++)
10+
{
11+
scanf("%d",&a[i]);
12+
}
13+
for(i=1;i<=n;i++)
14+
{
15+
b[i]=0;
16+
}
17+
for(i=1;i<=n;i++)
18+
{
19+
n1=i;
20+
for(j=1;j<=n;j++)
21+
{
22+
if(a[j]==n1)
23+
{b[i]=1;
24+
continue;
25+
}
26+
}
27+
}
28+
for(i=1;i<=n;i++)
29+
{
30+
if(b[i]==0)
31+
{
32+
printf("%d\n",i);
33+
}
34+
}
35+
}

0 commit comments

Comments
 (0)