#include<stdio.h>
int main()
{
int t[2],a,b,c,d;
for(int i=0;i<10;i++)
{
scanf("%d",&a);
if(t[0]==0)
{
t[0]=a;
}
else if(t[1]==0)
{
t[1]=a;
}
else if(a==t[0] || a==t[1])
{
d++;
t[0]=t[1];
t[1]=a;
}
}
printf("%d",a);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: