Código C++:
Ver original#include <iostream>
using namespace std;
int main(){
int refe,a,b,c,d,ctd;
cout << "Ingresa el valor referencia: ";cin >> refe;
cout << "Primer valor: ";cin >> a;
cout << "Segundo valor: ";cin >> b;
cout << "Tercer valor: ";cin >> c;
cout << "Cuarto valor: ";cin >> d;
if(refe==a){
ctd++;
}
if(refe==b){
ctd++;
}
if(refe==c){
ctd++;
}
if(refe==d){
ctd++;
}
cout << ctd;
}