Untitled
unknown
plain_text
3 years ago
532 B
5
Indexable
#include <iostream>
using namespace std;
int main()
{
int a[100],b,c=0;
for (int i = 0; i < 4; i++)
{
cin >> a[t];
}
for (int i = 0; i < 4; i++)
{
for (int j = i; j < 4; j++)
{
if (a[i] == a[j + 1])
{
c++;
}
}
}
if (c == 3) {
cout << 2;
return 0;
}
if (c == 6) {
cout << 3;
return 0;
}
else {
cout << c;
return 0;
}
}Editor is loading...