int a[3], i, j = 0;
for ( i = 0; i < 3; i++)
{
cout << "Input a" << i << " : ";
cin>>a[i];
}
for ( i = 0; i < 2; i++)
{
if (a[i] == a[i + 1])
{
cout << "a[" << i << "] = a[" << i + 1 << "] {" << a[i] << "}" << endl;
}
else
{
j++;
}
}
if (j==2)
{
cout << "Have not a equal" << endl;
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น