Skip to content

Commit 9c244f1

Browse files
committed
Update problem19.c
update as per the mail.
1 parent 82808fa commit 9c244f1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

problem19.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ void main()
88

99
{
1010

11-
float a[20],xor,c;
11+
int a[20];
1212

13-
int i,n,repeat;
13+
int I,j,total=0,tot=0,n,tot=0,repeat;
1414

1515
clrscr();
1616

@@ -24,17 +24,17 @@ for(i=0;i<=(n-1);i++)
2424

2525
{
2626

27-
Scanf(“%f”,&a[i]);
27+
Scanf(“%d”,&a[i]);
2828

29-
mul=a[i]*100;
29+
Total^=a[i];
3030

31-
}
31+
Tot^=I;
3232

33-
Xor=mul/10;
33+
}
3434

35-
C=xor/10;
35+
repeat=total^tot;
3636

37-
printf(“\n The repeated num is %f\n”,c);
37+
printf(“\n The repeated num is %d\n”,repeat);
3838

3939
getch();
4040

0 commit comments

Comments
 (0)