Write a program that reads four integers and prints two pairs if the input consists of two

Question:

Write a program that reads four integers and prints “two pairs” if the input consists of two matching pairs (in some order) and “not two pairs” otherwise. For example,

1 2 2 1 two pairs
1 2 2 3 not two pairs
2 2 2 2 two pairs

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: