Create an Account

Already have account?

Forgot Your Password ?

Home / Questions / Write a Java program that reads four integers and prints "two pairs" if the input consists 1

Write a Java program that reads four integers and prints "two pairs" if the input consists 1

Write a Java 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

Apr 02 2020 View more View Less

Answer (Solved)

question Subscribe To Get Solution

Related Questions